Re: How to remove duplicate lines but save one of the lines?

Поиск
Список
Период
Сортировка
От Francisco Reyes
Тема Re: How to remove duplicate lines but save one of the lines?
Дата
Msg-id f70a889ad5ab8c33dd2defc351f8c05a@stringsutils.com
обсуждение исходный текст
Ответ на How to remove duplicate lines but save one of the lines?  ("A B" <gentosaker@gmail.com>)
Список pgsql-general
On 11:33 am 07/21/08 "A B" <gentosaker@gmail.com> wrote:
> and I want it to be
> A 1
> B 3
> C 44

The slow way
select distinct field1, field2 from sometable.

The faster way
select field1,fields2 from sometable group by field1, field2.

Distinct should in theory be the same speed, but on several tests I have
done group by was faster. I posted a message to the list and there were
some explanations why group by was faster.. Hopefully someday they should
perform just as  efficiently.


В списке pgsql-general по дате отправления:

Предыдущее
От: Said Ramirez
Дата:
Сообщение: Re: How to remove duplicate lines but save one of the lines?
Следующее
От: "A B"
Дата:
Сообщение: Re: How to remove duplicate lines but save one of the lines?