[Monetdb-developers] Constraint violations with all details

Stefan de Konink stefan at konink.de
Sun Nov 23 15:43:45 CET 2008

Romulo Goncalves wrote:
> Something like this might work...
> Select to_way from relation_members_way where to_way not in (select 
> to_way from ways);

Wow :) Yup that works with a slight modification too :)

Select distinct relation from relation_members_way where to_way not in
(select id from ways);

I used:

select distinct relation_members_way.relation as relation from
relation_members_way left join ways on relation_members_way.to_way =
ways.id where ways.id is NULL;

Now it does get interesting :) because my query takes half of the time
than yours. 537ms vs 1095ms. I have attached both traces :)



More information about the developers-list mailing list