Hi,
I think this could be good :
select d1.id, d1.url, d1.tittle
from directory d1
where exists (select url from directory d2 where d1.url=d2.url and
d2.oid>d1.oid)
order by d1.url;
Hope this will help,
Regards,
Le Mardi 24 Juin 2003 12:16, Uros a écrit :
> 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.
--
Hervé Piedvache
Elma Ingénierie Informatique
6 rue du Faubourg Saint-Honoré
F-75008 - Paris - France
Pho. 33-144949901
Fax. 33-144949902