SQLite Forum

Performance issues with query parameters vs. static strings
> Now the number of IN parameters can go up to 1000 at a time

Passing arrays of arbitrary size to SQL `IN` is always a problem. Perhaps the [carray](https://sqlite.org/carray.html) extension could help you? The usual recommendation is to create a temporary table and `JOIN` with it, but I don't expect it to be faster.