Given the example below where 'first_table' could be huge, are sqlite or other relational databases clever enough to do the WHERE filter before doing the joins.
SELECT * FROM first_table INNER JOIN second_table ON second_table_id = second_table.id INNER JOIN third_table ON third_table_id = third_table.id WHERE first_table.target_field=x or would it be better to do SELECT * FROM (SELECT * FROM first_table WHERE target_field=x) INNER JOIN second_table ON second_table_id = second_table.id INNER JOIN third_table ON third_table_id = third_table.id _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users