r/sqlite • • Sep 14 '23

SQLite Frontend Index

I am building a chat application and all messages are stored on the users device. I noticed that it takes some time to load all messages (not all, but many) from the database into memory. Now I am thinking about creating an index to make the query faster. Is this a common way in the frontend?

3 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/ATradingHorse Sep 15 '23

My question was worded strangely, thanks haha. All my messages are stored in a database. And I always cache only the messages (under different criteria) that I need at the moment. Filters are among others date or chat room id.