Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Data Base Research(iOS)

Ivan edited this page Nov 1, 2017 · 9 revisions

We conducted a study for two most popular DataBases with encryption: Realm and SQLite + SQLCipher.

*If your project requires encryption or speed, then Realm is an obvious choice. If your project has a complex data model that changes frequently, then Core Data might be a better choice. Proof of concept

In our study we make 100 0000 of inserts for both db.

Device DataBase Write 100K Read 100K get id = 25000 get id = 50000 get id = 750000
iPhone-6 Realm 1595.26757625 seconds ≈ 26.5 minutes 63.889594291 seconds ≈ 1.02 minute 0.024680166 seconds ≈ 24ms 0.000911209 seconds ≈ 0.9ms 0.00061875 seconds ≈ 0.6ms
iPhone-5s Realm 1712.079746083 seconds ≈ 28.5 minutes 66.468130708 seconds ≈ 1.04 minute 0.023555917 seconds ≈ 23ms 0.0009235 seconds ≈ 0.9ms 0.000887458 seconds ≈ 0.8 ms
iPhone 6 SQLite + SQLCipher 1627.521456 seconds ≈ 27 minutes 120.184145834 seconds ≈ 2 minutes 0.005854 seconds ≈ 5.8ms 0.00222675 seconds ≈ 2.2ms 0.003761292 seconds ≈ 3.7ms
iPhone 6s SQLite + SQLCipher 1504.579757208 seconds ≈ 25 minutes 100.734026542 seconds ≈ 1.8 minute 0.022970333 seconds ≈ 22.9ms 0.000941875 seconds ≈ 0.9ms 0.000759333 seconds ≈ 0.7ms

Выбираем Реалм!

Clone this wiki locally