The stupid question is the question not asked | |
PerlMonks |
Re: SQLite and large number of parametersby bart (Canon) |
on Dec 10, 2012 at 11:53 UTC ( [id://1008091]=note: print w/replies, xml ) | Need Help?? |
Just where do you get those values from? My guess is you don't just make them up, and the user didn't enter them manually, so probably they're coming from somewhere in the database. So probably you can get the whole list using a reasonably simple query.
If at all possible, why not use a subquery, like: where something and something_else represent the query you used to get at that list. If it's not that simple, at worst you can first create temporary table with the values you're looking for in one column. p.s. It's possible that using an inner join, even on a subselect, is faster. Just test it.
(n.b. "USING(col1,col2)" is like "ON A.col_1=B.col_1 AND A.col_2 = B.col_2" except the "*" will pick up the column name(s) only once.)
In Section
Seekers of Perl Wisdom
|
|