On 02/01/2018 04:05 PM, Nick wrote:
I update sqlite in my Android mobile phone from 3.9.2 to 3.16.2.
And I find the default page_size in 3.9.2 is 1024 while in 3.16.2 is 4096
(changed since 3.12.0).
I think SQLITE_DEFAULT_PAGE_SIZE has great effect on the performance so I
use speedtest1.c to test it.

There are many test cases in speedtest1.c and case 270 is a DELETE case
which is the most time-consuming one.
There is a result.  (different version + different page_size)

                  3.16.2+4096         3.16.2+1024          3.9.2+4096
Case 270:       5.695s                 5.908s                   2.307s
TOTAL          75.182s                79.811s                 58.723s

It is easy to find 3.9.2+4096 is extremely faster than others.
And page_size has great effect on 3.9.2 but has only a small effect on
But why?

I think 3.16.2 should faster than 3.9.2 according to the measurements of
sqlite (https://www.sqlite.org/cpu.html) but I guess 3.9.2 used 1024 at that

Could someone give me any explanations? The result is strange but I think it
is reproducible if we set SQLITE_DEFAULT_PAGE_SIZE=4096 in 3.9.2.

Are you using the same sized cache in all tests?

For 3.9.2, the default cache was 2000 pages - 2MB with 1024 byte pages and 8MB with 4096 byte pages. But for 3.16.2 the default cache was changed to "-2000" - which means 2MB of cache regardless of page size. See the third paragraph of this:



sqlite-users mailing list

Reply via email to