Selecting dupes from table - Mailing list pgsql-general

From Uros
Subject Selecting dupes from table
Date
Msg-id 526292874.20030624121643@sir-mag.com
Whole thread Raw
Responses Re: Selecting dupes from table
Re: Selecting dupes from table
List 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 by date:

Previous
From: culley harrelson
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread
Next
From: Jean-Christian Imbeault
Date:
Subject: Re: Selecting dupes from table