Shane Dev wrote:

Hi Clemens,

Your query is much faster on my system - thanks!

Apart from visual inspection and testing, is there anyway to be sure your
query selects the same results as my query?

From https://sqlite.org/queryplanner.html "When programming in SQL you tell the system what you want to compute, not how to compute it". Is this an exception to the rule where the query planner must be told how to compute
the result?

select * from nodes where not exists (select * from edges where child=nodes.id);

select * from nodes where not exists (select 1 from edges where child=nodes.id);

 select * from nodes where id not in (select child from edges);


The first two queries look more 'procedural' than the last. So this may confirm "When programming in SQL you tell the system what you want to compute, not how to compute it"

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to