Sitemap
Steve Yang

Steve Yang

[Sqlite3] DB performance test

1 min readOct 10, 2019

working note

Get Steve Yang’s stories in your inbox

Join Medium for free to get updates from this writer.

I find my experiment effected by ‘cache_size’ of sqlite3 and file system ‘page cache’.
The ‘cache_size’ seems can be tuned by PRAGMA cache_size of sqlite3:

sqlite> PRAGMA cache_size=0;
sqlite> PRAGMA cache_size;
0

Another is file-system’s page cache, you can clean the cache by:

echo 1 > /proc/sys/vm/drop_caches  # page cache
echo 2 > /proc/sys/vm/drop_caches # dentry and inode cache
echo 3 > /proc/sys/vm/drop_caches # page + dentry and inode cache

After use the upper commands, my experiment seems not be effected by caches.

--

--