Is it a phone or tablet? I'd wonder if the CPU is going into thermal
throttle mode. As I understand it most phones and tablets can't keep
the CPU's running full speed without eventually throttling the CPU.
To me the fact uncompressed, while moving much more data, is more than 2
times faster suggests the bottleneck isn't the fileIO.
Thursday, September 7, 2017, 3:13:04 PM, you wrote:
YW> As mentioned in the subject, our goal is to improve performance regarding
YW> to batch sql updates.
YW> The update sql as follow,
>> UPDATE ITEM SET FIELD4 =? WHERE DS=?
YW> We run 100,000 updates in a single transaction. The zipvfs version takes
YW> about 20 min while uncompressed version takes about 7 min.
YW> I've also attached results of "EXPLAIN UPDATE ITEM SET FIELD4 = 10 WHERE DS
YW> = 15;".
YW> Any suggestions is very helpful.
YW> Some background:
YW> We have an app running on Android 4.2 using zipvfs.
YW> The page size is 4096
YW> The cache size is - 2000
YW> Table schema for ITEM
>> CREATE TABLE ITEM (
>> FIELD0 NUMERIC,
>> FIELD1 NUMERIC,
>> DS TEXT,
>> FIELD2 TEXT,
>> FIELD3 TEXT,
>> FIELD4 NUMERIC,
>> FIELD5 NUMERIC,
>> FIELD6 NUMERIC,
>> FIELD7 NUMERIC,
>> FIELD8 NUMERIC,
>> FIELD9 NUMERIC,
>> FIELD10 NUMERIC,
>> FIELD11 TEXT);
YW> The third column: "DS" is what we query by almost all the time. We also
YW> created index:
>> CREATE INDEX DS_INDEX ON ITEM(DS);
YW> There are 30 million records. Zipvfs size of 471mb vs uncompressed db (the
YW> one shipped with Android 4.2) size of 1.39gb.
YW> Zipvfs db using zlib and aes128, which are default.
sqlite-users mailing list