Re: Huge performance drop when using prepared statement
"Markus Gritsch" <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
On 08/12/2007, Martin Jenkins <[email protected]> wrote: > Markus Gritsch wrote: > > Hi, > > > > when using bind variables I get a huge performace drop compared to > > using a plain string. The query is demonstrated in the attached file > > "problematic_query.py". > > I don't claim to understand the output, but the EXPLAIN command shows > that the two queries are completely different. The slow query has one > statement which mentions KeyInfo and the fast query has two. It seems > reasonable to assume that KeyInfo ==> index so the difference is that > SQLite (or its query parser) can't use both indexes for the statement > with the bound variable. I suggest you post this on the actual SQLite > mailing list and see what DR Hipp says; it might be a bug or feature. > > Apologies for replying to this offlist. I can't post to the list from > the address that I'm subscribed with at the moment. > > Martin Thank you, I will post it on the sqlite list.