Hello!

$ time sqlite3 test32k.db "select count(*) from role_exist"
12500000

real    0m58.908s
user    0m0.056s
sys     0m0.864s

$ sqlite3 test32k.db
SQLite version 3.6.23
sqlite> .schema role_exist
CREATE TABLE role_exist (
  id INTEGER PRIMARY KEY,
  uid BLOB NOT NULL DEFAULT (randomblob(16)) UNIQUE ON CONFLICT REPLACE
);

So 58s for count of all records! The count(*) for all records may use
the counter from primary key b-tree, is't it?
==============
HARDWARE:

$ grep CPU /proc/cpuinfo 
model name      : Intel(R) Core(TM)2 Quad CPU    Q6700  @ 2.66GHz
model name      : Intel(R) Core(TM)2 Quad CPU    Q6700  @ 2.66GHz
model name      : Intel(R) Core(TM)2 Quad CPU    Q6700  @ 2.66GHz
model name      : Intel(R) Core(TM)2 Quad CPU    Q6700  @ 2.66GHz

$ free
             total       used       free     shared    buffers     cached
Mem:       8310892    7552880     758012          0      29496    6667708
-/+ buffers/cache:     855676    7455216
Swap:      3903784     301240    3602544

Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to