Dennis,

> # insert the repeated pr fields into the associated
pr table
> for n in range(28):
>     cur.execute("insert into pr values(?, ?, ?)",
(id, n+1, float(fields[n+3]))


> Even if you don't normalize your table this sample 
> should show how to use parameters (the question
marks
> in the SQL) to make your SQL clearer and safer (and 
> due to statement caching in pysqlite it should also 
> perform faster). 

A few months ago, I wrote a C program that uses
sqlite3.  That was cool and I got really good
performance... something like inserting around
45Million records in a little over 5 minutes.  I was
very happy with that one.

Now I'm investigating using pysqlite for some quick
and dirty jobs and I'm trying to understand if there
is a need to prepare the statements once, then bind
and insert for every record, the same way I did it in
C.

Your example above seems to do all of these in one
shot.  Do you know what happens behind the scenes with
your example?  Is there an implicit "prepare" that
happens once and then a bind/insert everytime the
statement is encountered?
 
Thanks,

Jay

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to