There are few questions related to this topic on stackoverflow, But I didn't get the proper answer. I have some doubts on performance of flat files, Is it better to use flat files instead of SQLite ?
I took performance statistics for Android SQLite
.
I have performance statistics for one table which have 21 columns
Can anybody please suggest how to reduce this insertion time.
Records Write time in ms Read time in ms
1000 67813 608
1000 66340 604
1000 64359 609
10000 679837 5159
10000 618062 5110
10000 644638 5729
10000 646878 5890
Flat file
have less time rather than SQLite
So anybody please suggest me how can i improve this time for SQLite.
I am using simple database open insert using ContentValues
and database close.
Please suggest me some things how to improve these statistics.
Updated Performance statistics after using below answer.Still i want to increase these performance.
Records Writetime in ms Readtime in ms
1000 1645 530
1000 2497 672
1000 3143 610
10000 16356 5243
10000 14006 5122
10000 13158 5002
10000 14828 5234
100000 125525 77622
Thanks