On 21 Mar 2015, at 6:46pm, Mario M. Westphal <mw at mwlabs.de> wrote:

> 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.

Can someone point me to that discussion somewhere that doesn't need a password ?

> 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().

If it's anywhere, it's here:

<https://www.sqlite.org/limits.html>

I don't see it, so I suspect you're limited only by maximum statement length.  
However, if your statement is very long, I wonder if your first paragraph will 
still hold.

Simon.

Reply via email to