Selecting dupes from table

Поиск
Список
Период
Сортировка
От Uros
Тема Selecting dupes from table
Дата
Msg-id 526292874.20030624121643@sir-mag.com
обсуждение исходный текст
Ответы Re: Selecting dupes from table  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Selecting dupes from table  (Hervé Piedvache <herve@elma.fr>)
Список pgsql-general
Hello ,

I have table directory with 3 columns (id,url,title)

I want to list all entries with duplicate urls.

I tried this:

select id,url,title from directory where url IN
  (select url from directory group by url having count(url) > 1)
ORDER by url;

but this takes 30 seconds with 25.000 entries. I have index on url.

Can I use any other query to select this faster.


--
Best regards,
 Uros                          mailto:uros@sir-mag.com


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

Предыдущее
От: culley harrelson
Дата:
Сообщение: Re: [pgsql-advocacy] interesting PHP/MySQL thread
Следующее
От: Jean-Christian Imbeault
Дата:
Сообщение: Re: Selecting dupes from table