Home

Awesome

LiteDB-Perf

A simple actions to compare SQLite and LiteDB v3

Results:

5.000 recordsLiteDB #1LiteDB #2LiteDB #3SQLite #1SQLite #2SQLite #3
Insert4.999 ms5.690 ms4.839 ms46.379 ms49.296 ms4.107 ms
Bulk236 ms280 ms219 ms122 ms122 ms106 ms
Update3.674 ms3.784 ms3.242 ms47.470 ms48.490 ms4.101 ms
CreateIndex176 ms174 ms176 ms13 ms36 ms8 ms
Query204 ms208 ms93 ms457 ms463 ms468 ms
Delete157 ms207 ms140 ms11 ms13 ms3 ms
Drop17 ms56 ms14 ms11 ms25 ms3 ms
FileLength7.580 kb7.576 kb7.572 kb3.824 kb3.856 kb3.824 kb

Low is better

LiteDB

SQLite

Tested on MacBook Pro 2012 i5, Win10, 8Gb RAM, SSD


LiteDB: default - 5000 records
==============================
Insert         :  4999 ms -     1000 records/second
Bulk           :   236 ms -    21184 records/second
Update         :  3674 ms -     1361 records/second
CreateIndex    :   176 ms -    28321 records/second
Query          :   204 ms -    24467 records/second
Delete         :   157 ms -    31722 records/second
Drop           :    17 ms -   289513 records/second
FileLength     :  7580 kb

LiteDB: encrypted - 5000 records
================================
Insert         :  5690 ms -      879 records/second
Bulk           :   280 ms -    17820 records/second
Update         :  3784 ms -     1321 records/second
CreateIndex    :   174 ms -    28669 records/second
Query          :   208 ms -    24037 records/second
Delete         :   207 ms -    24078 records/second
Drop           :    56 ms -    87898 records/second
FileLength     :  7576 kb

LiteDB: exclusive no journal - 5000 records
===========================================
Insert         :  4839 ms -     1033 records/second
Bulk           :   219 ms -    22775 records/second
Update         :  3242 ms -     1542 records/second
CreateIndex    :   176 ms -    28379 records/second
Query          :    93 ms -    53243 records/second
Delete         :   140 ms -    35574 records/second
Drop           :    14 ms -   334283 records/second
FileLength     :  7572 kb

SQLite: default - 5000 records
==============================
Insert         : 46379 ms -      108 records/second
Bulk           :   122 ms -    40827 records/second
Update         : 47470 ms -      105 records/second
CreateIndex    :    13 ms -   367266 records/second
Query          :   457 ms -    10933 records/second
Delete         :    11 ms -   441583 records/second
Drop           :    11 ms -   454141 records/second
FileLength     :  3824 kb

SQLite: encrypted - 5000 records
================================
Insert         : 49296 ms -      101 records/second
Bulk           :   122 ms -    40851 records/second
Update         : 48490 ms -      103 records/second
CreateIndex    :    36 ms -   136413 records/second
Query          :   463 ms -    10798 records/second
Delete         :    13 ms -   357189 records/second
Drop           :    25 ms -   199642 records/second
FileLength     :  3856 kb

SQLite: no journal - 5000 records
=================================
Insert         :  4107 ms -     1217 records/second
Bulk           :   106 ms -    47121 records/second
Update         :  4101 ms -     1219 records/second
CreateIndex    :     8 ms -   592916 records/second
Query          :   468 ms -    10680 records/second
Delete         :     3 ms -  1578981 records/second
Drop           :     3 ms -  1574952 records/second
FileLength     :  3824 kb