On 6/29/2011 12:53 PM, Pete wrote: > Looking for opinions on the relative efiiciency of Scalar queries versus > non-scalar with JOIN statements. > > For example, the following two queries would produce the same results but > would one of them be significantly faster than the other? > > SELECT column1, tableB.column2 FROM TableA LEFT JOIN TableB ON > TablebB.indexcolumn = TableA.primarykeycolumn > > OR > > SELECT column1, (SELECT column2 FROM TableB WHERE TableB.indexcolumn = > TableA.primarykeycolumn) FROM TableA
The two queries are not equivalent - the first one may return more rows. In those cases where they are equivalent, I strongly doubt you'll notice any performance difference. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users