pySQLite Insert speed

mdboldin at mdboldin at
Fri Feb 29 04:35:03 CET 2008

I hav read on this forum that SQL coding (A) below is preferred over
(B), but I find (B) is much faster (20-40% faster)


    sqla= 'INSERT INTO DTABLE1 VALUES (%d, %d, %d, %f)'  %  values

     pf= '?, ?, ?, ?'
    sqlxb= 'INSERT INTO DTABLE2 VALUES ( %s ) ' % pf
    curs.execute( sqlxb, values )

Any intution on why (A) is slower?

More information about the Python-list mailing list