On Sun, 9 Dec 2007 10:55:16 +0100, "Markus Gritsch"
<[EMAIL PROTECTED]> 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".

Problematic SELECT:
> c.execute("""SELECT * FROM entry, word, word_entry WHERE
>  entry.id = word_entry.entry_id AND
>  word.id = word_entry.word_id AND
>  word.word GLOB ?
> """, ('hui*',))

I must admit I never use Python, but, considering the docs in
http://docs.python.org/lib/module-sqlite3.html, shouldn't the
last line be:

""", ('hui*'))

(without the extra comma)?

>The database used can be downloaded from
>  http://xile.org/le/prepared_statement.zip (1.75 MB)
>
>or generated by using the attached file "create_test_db.py".
>
>Kind regards,
>Markus
-- 
  (  Kees Nuyt
  )
c[_]

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to