http://www.perlmonks.org?node_id=1008090


in reply to SQLite and large number of parameters

Not sure if it's faster, but you could always try not using placeholders:

my $sql = sprintf q[ SELECT * FROM my_table WHERE col_1 IN (%s) AND col_2 IN (%s) ], join(', ', @$set_1), join(', ', @$set_2);

If you can't be sure that they are all integers, be sure to map then through $dbh->quote first.

Replies are listed 'Best First'.
Re^2: SQLite and large number of parameters
by menth0l (Monk) on Dec 10, 2012 at 13:40 UTC
    Thanks for suggestion, I will try that.