Do custom TableEngines require storage to be sorted?

16 views
Skip to first unread message

Jonathan Ellis

unread,
Mar 9, 2020, 2:59:40 PM3/9/20
to H2 Database
Looking at Table.getScanIndex and the Index interface, it seems to assume that there is at least one sorted index for every Table.  Is that accurate?

Evgenij Ryazanov

unread,
Mar 9, 2020, 8:51:22 PM3/9/20
to H2 Database
Hello.

Scan index may return all rows from the find() method (but it should also return true from isFindUsingFullTableScan()).

Order of elements in the index is not used in this case if index is not returned from Table.getIndexes().

If you can efficiently lookup rows by values in some columns, you can create additional hash indexes to improve performance of some queries. Hash indexes from Table.getIndexes() aren't used for sorting too.
Reply all
Reply to author
Forward
0 new messages