Android SQLite Optimization Plan

Table of Contents

1. Android SQLite Optimization Plan

Premature optimization is the root of all evil – Donald Knuth

Before applying the `optimization', to my knowledge , the following topics should be carefully explored.

1.1. Benchmark tools

1.2. SQLite tuning

1.2.1. threading model

1.2.2. page size

1.2.3. cache size

1.2.4. synchronous

1.2.5. in-memory db

1.2.6. count change

1.2.7. vacuum

1.2.8.

1.3. Best practice

1.3.1. Sql best practice

1.3.1.1. index
1.3.1.2. glob & like
1.3.1.3. trigger
1.3.1.4. user functions
1.3.1.5. conflict resolution
1.3.1.6. join
1.3.1.7. explain query plan
1.3.1.8.

1.3.2. Android database api best practice

1.3.2.1. applyBatch
1.3.2.2. ContentProviderClient
1.3.2.3. withYieldAllowed
1.3.2.4. DatabaseUtils.insertHelper
1.3.2.5. DatabaseUtils.longForQuery
1.3.2.6. use SQLiteDatabase
1.3.2.7. notifyChange & ContentObserver
1.3.2.8. CursorWindow
1.3.2.9. Multiple-process provider
1.3.2.10.

1.4. Optimization

1.4.1. Android framework optimization

1.4.1.1. Write Ahead Logging
1.4.1.2. Multiple connection
1.4.1.3. SQLiteDatabase locking model
1.4.1.4.

1.4.2. SQLite optimization

Author: [email protected]
Date:
Last updated: 2021-07-23 Fri 14:22

知识共享许可协议