aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_fts3_test.go
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@nexedi.com>2018-02-16 20:44:19 +0300
committerKirill Smelkov <kirr@nexedi.com>2018-02-16 20:44:19 +0300
commitf675967c5485302062dbe18c8e0f9146cb1cc81c (patch)
treeb5e88eea54bf547016c967fe71d06d75f5859176 /sqlite3_fts3_test.go
parentMerge pull request #527 from mattn/sqlite-amalgamation-3220000 (diff)
downloadgolite-f675967c5485302062dbe18c8e0f9146cb1cc81c.tar.gz
golite-f675967c5485302062dbe18c8e0f9146cb1cc81c.tar.xz
Let SQLite use pread/pwrite
With current settings SQLite was using lseek/read syscalls to read data, e.g.: 20:43:17.640660 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0 20:43:17.640683 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:43:17.640705 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0 20:43:17.640725 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:43:17.640744 stat(".../neo.sqlite-journal", 0x7ffef2c91080) = -1 ENOENT (No such file or directory) 20:43:17.640764 lseek(3, 24, SEEK_SET) = 24 20:43:17.640779 read(3, "\0\0\0\33\0\0\10\235\0\0\10]\0\0\0\27", 16) = 16 20:43:17.640795 stat(".../neo.sqlite-wal", 0x7ffef2c91080) = -1 ENOENT (No such file or directory) but if we allow it to use pread it will be only 1 system call instead of 2 and reading this way can also be done in parallel because there is no global to file seeking: 20:48:42.668466 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0 20:48:42.668501 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:48:42.668522 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0 20:48:42.668542 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:48:42.668561 stat(".../neo.sqlite-journal", 0x7ffdbc1f22c0) = -1 ENOENT (No such file or directory) 20:48:42.668580 pread64(3, "\0\0\0\33\0\0\10\235\0\0\10]\0\0\0\27", 16, 24) = 16 20:48:42.668597 stat(".../neo.sqlite-wal", 0x7ffdbc1f22c0) = -1 ENOENT (No such file or directory) (if needed this enablement can be done per OS)
Diffstat (limited to 'sqlite3_fts3_test.go')
0 files changed, 0 insertions, 0 deletions