SQLite Forum

Performance issues with query parameters vs. static strings
Login
I did a quick test and sqlite3_bind_parameter_index() has a big O complexity of
N squared. If you are calling that before every bind, I think that is your problem. Just processing the named parameters in the prepare is also N squared, even omitting the sqlite3_bind_parameter_index() call.