On 3 Nov 2013, at 9:07am, Dominique Devienne <ddevie...@gmail.com> wrote:
> This is consistent with findings we've seen in our own software, where > rewriting queries to use joins instead of custom SQL functions sped up some > queries considerably. The SQLite engine completely understands JOINs. It can do lots of rearranging of a JOIN to optimize all aspects of it, including noticing when one index is useful for combinations of WHERE, JOIN, and ORDER BY. You can make it even better by doing an ANALYZE when the pattern of your data changes. Sub-SELECTs aren't quite as good as JOINs but SQLite still understands them very well. Custom functions are great for custom uses, but all SQLite knows is that you have a function. It can't do any optimization using them. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users