Closed hussainmohd-a closed 1 year ago
See also:
AppSearch: https://developer.android.com/guide/topics/search/appsearch (Android 12+).
Squeezing performance from SQLite with Room: https://archive.is/mN83U
Deep dive into Room persistence library: https://archive.is/XaOEy
Indices aren't really required (since primary keys are approp set) except for indices required for ipAddress
and dnsQuery
Stats screen: https://github.com/celzero/rethink-app/commit/019eacb0f7e45d448e845a6fadb85d67655fe831
As for app-search, that's a different issue and tracked #743
cov index for order by
queries also resulted in slow performance for tables (network logs / dns logs) with > 100K entries: https://stackoverflow.com/a/50776662
a potential soln is to use primary key (auto-incrementing ID) for sorting (order by
) or add an index on the sorted (usually, timeStamp
) field.
Indexes aren't free though, and there are more than one type, each suited to different kinds of query patterns and space complexity: https://archive.is/j1nTl
https://github.com/celzero/rethink-app/pull/282#discussion_r663547351_