I'm using a SQLite database in my Android app. I have a non-variable table with, more or less, 500 rows. I want to query these rows ordered by a varchar column (alphabetical order).
What would be faster:
- Add an index on that column
or
- Sorting this data in-memory and then persist with an integer ordering column?
My first approach was add an index but then I have studied that indexes on varchar columns are not quite efficient.
Thanks.
Aucun commentaire:
Enregistrer un commentaire