SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

SpacetimeDB supports for hashmap indexing

Open vovacooper opened this issue 9 months ago • 1 comments

would love to see an option to index a table not only in btree but also as hashmap. (like hash index on postgres https://www.postgresql.org/docs/current/hash-index.html)

please please please add this

vovacooper avatar Mar 07 '25 10:03 vovacooper

Hey @vovacooper! Can you help us understand why this is so important for you?

bfops avatar Apr 02 '25 17:04 bfops

hello @bfops ! i personally would love this feature to be able to find data (like vector3) in O(1) time for my voxel world.

Frisk197 avatar Oct 02 '25 13:10 Frisk197

Hey @Frisk197! I can say that BitCraft is currently using btree indexes for their world, and it's working well for them (on top of chunking, similar to what Minecraft does).

Are you seeing performance issues in your project?

bfops avatar Oct 03 '25 20:10 bfops

@bfops yes i do have a performance issue, but i'm not sure if it's some limitation of spacetimedb or my dogshit code X)

I'm trying to send a list of 10 positions to the server every 100ms. it's supposed to do a fast voxel traversal from the origin of the scan to all the points to remove any points in between and then add the point to the database but sometimes it can take 4 seconds for some reason.

here's a test repository with some parts of my project to reproduce the problem : https://github.com/Frisk197/SaKADo_TEST i'm making an xr app but with this setup you can just start the app in unity

Frisk197 avatar Oct 06 '25 13:10 Frisk197

i was asked on the discord to make a new issue : https://github.com/clockworklabs/SpacetimeDB/issues/3394

Frisk197 avatar Oct 09 '25 16:10 Frisk197