I've read http://www.sqlite.org/optoverview.html but don't find my answer there.
In the following query, WOIDS has 4 million rows and CORNFIX has 25,000 rows. UPDATE WOIDS SET corn = 1 WHERE EXISTS ( SELECT * FROM CORNFIX WHERE (cornfix.col_1 = woids.ttl) AND (cornfix.col_2 = woids.pos) AND (cornfix.col_3 = woids.wrdid) ) Each table has a composite unique index: unique index WOIDS_IX on ttl, pos, wrdid unique index CORNFIX_IX on col_1, col_2, col_3 CORNFIX has only these three columns, no others. The indexed columns are all INT. Given these two composite unique indexes on INT columns, will SQLite automatically figure out that there's a huge difference in the number of rows in the two tables, and do an inner loop on CORNFIX table? Thanks _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users