Re: pySQLite Insert speed
- From: Steve Holden <steve@xxxxxxxxxxxxx>
- Date: Fri, 29 Feb 2008 09:37:38 -0500
mdboldin@xxxxxxxxx wrote:
(B) is better than (A). The parameter binding employed in (B)See, for example,http://informixdb.blogspot.com/2007/07/filling-in-
is not only faster on many databases, but more secure.
blanks.html
Thx. The link was helpful, and I think I have read similar things
before-- that B is faster.
So ... I just rewrote the test code from scratch and B is faster. I
must have had something wrong in my original timing.
Don't forget, by the way, that your original (B) code was performing the string substitution of the parameter markers into the SQL statement each time the statement was executed. As Carsten pointed out, this overhead should be performed at most once, and only then if you want your code to be portable over database backends with different paramstyles. Forget (A).
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
.
- References:
- pySQLite Insert speed
- From: mdboldin
- Re: pySQLite Insert speed
- From: Carsten Haese
- Re: pySQLite Insert speed
- From: mdboldin
- pySQLite Insert speed
- Prev by Date: why not bisect options?
- Next by Date: Re: How to configure Python in Windows
- Previous by thread: Re: pySQLite Insert speed
- Next by thread: buy cheap tibia gold here gameotl.com
- Index(es):
Relevant Pages
|