Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit Room for possible index creation. #330

Closed
hussainmohd-a opened this issue Jul 9, 2021 · 3 comments
Closed

Revisit Room for possible index creation. #330

hussainmohd-a opened this issue Jul 9, 2021 · 3 comments

Comments

@hussainmohd-a
Copy link
Collaborator

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

#282 (comment)_

@ignoramous
Copy link
Collaborator

ignoramous commented Jul 24, 2021

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

@ignoramous
Copy link
Collaborator

Indices aren't really required (since primary keys are approp set) except for indices required for ipAddress and dnsQuery Stats screen: 019eacb

As for app-search, that's a different issue and tracked #743

@ignoramous
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants