Hi, I am using a Page Size of 65536 and I have found the performance good enough for me until now. I have the database having the following table:
CREATE TABLE map ( n BIGINT NOT NULL DEFAULT 0, s INT(5) NOT NULL DEFAULT 0, d INT(5) NOT NULL DEFAULT 0, c INT(1) NOT NULL DEFAULT 0, b UNSIGNED BIGINT NOT NULL DEFAULT 0 ); CREATE INDEX map_index ON map (d, n, s, c, b); This table has around 600 Million records. I do the following : root> sqlite3 my.db sqlite> SELECT * FROM map where d = 15; There are around 15 Million records for 'd' column with value 15. As the rows are outputted the memory usage of sqlite shoots to 126 MB (which I assume is 2000 pages x 64KB which is ok). After the query is finished I run the following : sqlite> pragma shrink_memory; The memory drops to 65M. I then dumped the database and re-imported it into a newer database with page size as 1024. When running the select query the memory usage doesnt cross 5-6 MB and shrink_memory reduces it back to near 2 MB. I am checking the memory usage with the following : root> top -d 1 -p `pidof sqlite3` This leads me to conclude that there is some kind of Memory Leakage when the page size is 64K. How can I bring down the memory usage atleast when I shrink_memory after the query executes. I have tried this on SQLITE 3.8.1 and SQLITE 3.7.17 Regards _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users