I have not looked at the schema and queries in detail. But at a first glance:
> CREATE VIEW v_most_recent_lookup_per_url AS > ... > ORDER BY url_id; Drop the ORDER BY; it is useless in a view used in another query, and just might slow things down. > 0 1 1 SEARCH TABLE lookups AS l USING AUTOMATIC COVERING INDEX > (is_generic_flag=? AND url_id=?) If SQLite thinks that an AUTOMATIC index is useful, you should consider creating it explicitly: CREATE INDEX lookup_generid_id_idx ON lookups(is_generic_flag, url_id); Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users