Hash Indexes
would love to see hash indexes in the spacetimedb
Our most recent integration benchmarks trying out hash indices suggested that they did not actually gain any performance. However, microbenchmarks did suggest that there was a significant speedup.
For cases like entity_id: u32 and friends, we have another type of index already available: #[index(direct)].
It's substantially faster than btree and hash indices for monotonically increasing IDs but performs poorly for randomized data.
You may want to look at using direct for your use case.
Please elaborate on “cases like entity_id: u32 and friends”, what is the particular case?
I don't see how entity_id would be monotonic without auto_inc, but that's already only useful on primary keys (thus an implicit index).