4 ms·
How do indexes work? Do you design them yourself or do they get automatically added based on some kind of heuristics?
by winrid 4y ago
How do indexes work? Do you design them yourself or do they get automatically added based on some kind of heuristics?
- sikan_ 4y agoWe don't do anything automatic like that (yet?), you will have to add indexes manually. But I would have to say - modern day databases are so fast that you probably won't notice the performance of adding indexes until at least 100k+ rows in a table and/or you have very high read throughput on that particular table.
- winrid 4y agoYou'll see a performance benefit way before 100k rows depending on the size of each row, especially with sorting. It might save you guys a ton of CPU hosting wise, depending on how this all works, to track slow queries and auto add indexes. Way worth the write overhead in most cases.
- deleted 4y ago[deleted]
- sikan_ 4y agoAh yes if you need sorting then indexed are def the way to go!
- atonse 4y agoIt’s likely that most of their customers would only have a few hundred or thousand rows where indexing may not actually matter after all. Otherwise I’m sure they would’ve prioritized it.
- winrid 4y agoYeah for now. You know people will try storing all tweets in it or whatever :)
- johnthescott 4y agohuh? what about joins? surely your customers are doing joins. a few thousand times a few thousand is >> 1 million.