|
Test 2: 25000 INSERTs in a transaction
BEGIN; CREATE TABLE t2(a INTEGER, b INTEGER, c VARCHAR(100)); INSERT INTO t2 VALUES(1,298361,'two hundred ninety eight thousand three hundred sixty one'); ... 24997 lines omitted INSERT INTO t2 VALUES(24999,447847,'four hundred forty seven thousand eight hundred forty seven'); INSERT INTO t2 VALUES(25000,473330,'four hundred seventy three thousand three hundred thirty'); COMMIT;
| SQLite 3.3.3 (sync): |
0.764 |
| SQLite 3.3.3 (nosync): |
0.748 |
| SQLite 2.8.17 (sync): |
0.698 |
| SQLite 2.8.17 (nosync): |
0.663 |
| PostgreSQL 8.1.2: |
16.454 |
| MySQL 5.0.18 (sync): |
7.833 |
| MySQL 5.0.18 (nosync): |
7.038 |
| FirebirdSQL 1.5.2: |
4.280 |
Test 3: 25000 INSERTs into an indexed table
BEGIN; CREATE TABLE t3(a INTEGER, b INTEGER, c VARCHAR(100)); CREATE INDEX i3 ON t3(c); ... 24998 lines omitted INSERT INTO t3 VALUES(24999,442549,'four hundred forty two thousand five hundred forty nine'); INSERT INTO t3 VALUES(25000,423958,'four hundred twenty three thousand nine hundred fifty eight'); COMMIT;
| SQLite 3.3.3 (sync): |
1.778 |
| SQLite 3.3.3 (nosync): |
1.832 |
| SQLite 2.8.17 (sync): |
1.526 |
| SQLite 2.8.17 (nosync): |
1.364 |
| PostgreSQL 8.1.2: |
19.236 |
| MySQL 5.0.18 (sync): |
11.524 |
| MySQL 5.0.18 (nosync): |
12.427 |
| FirebirdSQL 1.5.2: |
6.351 |
Test 4: 100 SELECTs without an index
SELECT count(*), avg(b) FROM t2 WHERE b>=0 AND b<1000; SELECT count(*), avg(b) FROM t2 WHERE b>=100 AND b<1100; SELECT count(*), avg(b) FROM t2 WHERE b>=200 AND b<1200; ... 94 lines omitted SELECT count(*), avg(b) FROM t2 WHERE b>=9700 AND b<10700; SELECT count(*), avg(b) FROM t2 WHERE b>=9800 AND b<10800; SELECT count(*), avg(b) FROM t2 WHERE b>=9900 AND b<10900;
| SQLite 3.3.3 (sync): |
3.153 |
| SQLite 3.3.3 (nosync): |
3.088 |
| SQLite 2.8.17 (sync): |
3.993 |
| SQLite 2.8.17 (nosync): |
3.983 |
| PostgreSQL 8.1.2: |
5.740 |
| MySQL 5.0.18 (sync): |
2.718 |
| MySQL 5.0.18 (nosync): |
1.641 |
| FirebirdSQL 1.5.2: |
2.976 |
Test 5: 100 SELECTs on a string comparison
SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%one%'; SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%two%'; SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%three%'; ... 94 lines omitted SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%ninety eight%'; SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%ninety nine%'; SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%one hundred%';
| SQLite 3.3.3 (sync): |
4.853 |
| SQLite 3.3.3 (nosync): |
4.868 |
| SQLite 2.8.17 (sync): |
4.511 |
| SQLite 2.8.17 (nosync): |
4.500 |
| PostgreSQL 8.1.2: |
6.565 |
| MySQL 5.0.18 (sync): |
3.424 |
| MySQL 5.0.18 (nosync): |
2.090 |
| FirebirdSQL 1.5.2: |
5.803 |
Test 6: INNER JOIN without an index
SELECT t1.a FROM t1 INNER JOIN t2 ON t1.b=t2.b;
| SQLite 3.3.3 (sync): |
14.473 |
| SQLite 3.3.3 (nosync): |
14.445 |
| SQLite 2.8.17 (sync): |
47.776 |
| SQLite 2.8.17 (nosync): |
47.750 |
| PostgreSQL 8.1.2: |
0.176 |
| MySQL 5.0.18 (sync): |
3.421 |
| MySQL 5.0.18 (nosync): |
3.443 |
| FirebirdSQL 1.5.2: |
0.141 |
Test 7: Creating an index
CREATE INDEX i2a ON t2(a); CREATE INDEX i2b ON t2(b);
| SQLite 3.3.3 (sync): |
0.552 |
| SQLite 3.3.3 (nosync): |
0.526 |
| SQLite 2.8.17 (sync): |
0.650 |
| SQLite 2.8.17 (nosync): |
0.605 |
| PostgreSQL 8.1.2: |
0.276 |
| MySQL 5.0.18 (sync): |
1.159 |
| MySQL 5.0.18 (nosync): |
0.275 |
| FirebirdSQL 1.5.2: |
0.264 |
(阅读次数:)
|