----- Original Message ----- From: "Steven Van Ingelgem" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, August 23, 2005 8:36 AM
Subject: [sqlite] Speed.html


Hi,

I just redid the speedtest.tcl-script in PHP
(http://www.karels0ft.be/tmp/speed_script.html).

Can  anyone check why the SQLite3's are so slow compared to
SQLite2's ?


This script maybe could be used by someone with too much time to
check up the timings of the latest versions, to recreate the
speed.html-document, as it's a little outdated.
[http://www.karels0ft.be/tmp/speed.html]

To be complete, you should include prepared statement execution tests in your speed comparisons. Most modern databases are designed around a prepared statement/parameterized execution model, and you're not getting ideal performance when you're inserting or updating thousands and thousands of rows by manufacturing an INSERT/UPDATE statement for each row.

Even your select tests would benefit from being prepared once and queried using parameters.

As an example, using a prepared statement and an integer parameter inside a transaction, I can insert about 100,000 rows a second into an indexed SQLite3 table using my ADO.NET 2.0 provider in C#. (Computer is a 3.2ghz HT laptop running XP Media Center Ed.). Times will of course drop when inserting strings or adding multiple parameters, but in theory prepared statements using parameters should always win over self-generated statements in all bulk op tests.

Robert


Reply via email to