In a recent question (http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/2015-March/058668.html) I found out that joining with a single-column temporary table with 500 rows is sometimes several hundred times (!) slower than using an IN clause.
So far my code switched to using a temporary table and a JOIN instead of an IN clause when the IN clause would contain more than 500 elements (numbers). I would like to use larger IN clauses if that?s possible to avoid using temporary tables, but I could not find a limit for how many elements I can use in IN().