> CREATE TABLE n1(a integer primary key);
> INSERT INTO "n1" VALUES(1);
> INSERT INTO "n1" VALUES(2);
> INSERT INTO "n1" VALUES(3);
> INSERT INTO "n1" VALUES(4);
> INSERT INTO "n1" VALUES(5);
> INSERT INTO "n1" VALUES(6);
> INSERT INTO "n1" VALUES(7);
> INSERT INTO "n1" VALUES(8);
> INSERT INTO "n1" VALUES(9);
> INSERT INTO "n1" VALUES(10);
> CREATE VIEW vu as select v3.a a from n1 v1,n1 v2,n1 v3,n1 v4,n1 v5,n1 v6,n1 
> v7;
> select sum(a-1234567890.12345678+123456789012345) from vu where a>1;
> 
> Without the patch, the SQL above completes in 15.1 seconds on my machine.
> With the patch it takes just 10.4 seconds.

The timings above were compiled with -DSQLITE_DEBUG=1.

When both the original sqlite 3.5.1 shell and the patched 3.5.1 
shell are compiled with:

  -O2 -fomit-frame-pointer -DNDEBUG -DTHREADSAFE=0

it yields a more pronounced effect:

  unmodified 3.5.1  -  9.4 seconds
  patched 3.5.1     -  4.4 seconds

Admittedly, the benchmark example above is contrived to demonstrate 
the effect, but even common SQL containing floating point constants 
like:

  SELECT -123.456789012345 * x from t1;

will show a noticeable improvement with the patch when run against
large data sets.


__________________________________________________
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