pySQLite Insert speed
- From: mdboldin@xxxxxxxxx
- Date: Thu, 28 Feb 2008 19:35:03 -0800 (PST)
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)
(A)
sqla= 'INSERT INTO DTABLE1 VALUES (%d, %d, %d, %f)' % values
curs.execute(sqla)
(B)
pf= '?, ?, ?, ?'
sqlxb= 'INSERT INTO DTABLE2 VALUES ( %s ) ' % pf
curs.execute( sqlxb, values )
Any intution on why (A) is slower?
.
- Follow-Ups:
- Re: pySQLite Insert speed
- From: Carsten Haese
- Re: pySQLite Insert speed
- Prev by Date: Re: Permission to use Mac OS 'rocketship' dock icon?
- Next by Date: Re: Problems Generating HTML With pydoc
- Previous by thread: (Newbie) Help with sockets.
- Next by thread: Re: pySQLite Insert speed
- Index(es):