In SQL Databases, can we use the statement "CREATE INDEX" to keep the table sorted by a field after each insert and improve read performance? Can we do the same in OpenSearch/ElasticSearch?
Asked
Active
Viewed 132 times
1 Answers
1
Yes, it's possible in both Elasticsearch and Opensearch using a feature called index sorting, where you define the sorting criteria in the index settings and then all the data is indexed in a sorted manner.
The sorting supposedly slows down a little bit the indexing throughput, but the idea is that sorting at search time will be much faster.

Val
- 207,596
- 13
- 358
- 360