5 ms·
This sounds really cool! I've sometimes wondered why server-based RDBMSs don't offer something like this. Is it too hard to implement? Or did people just not t
by krylon 4y ago
This sounds really cool!
I've sometimes wondered why server-based RDBMSs don't offer something like this. Is it too hard to implement? Or did people just not think of it? Or do they have something like this and I just never learned about it?
- deleted 4y ago[deleted]
- A321321 4y agoMicrosoft SQL Server definitely has suggestions for missing indexes. The quality of the suggestions are debatable though
- krylon 4y agoThank you!
- gfody 4y agosql server has the index tuning wizard (itwiz) that will sample your data and make suggestions, and more lately the missing index stuff as a consequence of how the execution planner is designed (iirc it tries to generate optimal plans regardless of what indexes are available and when plans are eliminated because the necessary indexes don't exist it emits records for the various "missing index" dmvs)
- iasay 4y agoIndeed. It's even more fun when it starts generating really bad execution plans for table statistics it has completely got wrong, almost always while I'm eating my lunch.
- dmitriid 4y agoMicrosoft SQL Server query analyzer was was essential in identifying missing indexes. Wherever you saw "full table scan" on a table, you knew it was missing an index. I don't know if it's still around, but in mid-2000s it was light years ahead of any other database.
- striking 4y agohttps://explain.dalibo.com/ https://explain.dalibo.com/ and https://explain.depesz.com/ https://explain.depesz.com/ are indispensable tools for visualizing Postgres' EXPLAIN output in a similar way. I will agree that the MSSQL query visualizer is more visually effective, though.
- pronoiac 4y agoYou'd probably enjoy this other discussion on the front page: https://news.ycombinator.com/item?id=31990836 https://news.ycombinator.com/item?id=31990836
- beachy 4y agoOracle (and likely others) have had this since well into the last century. As you might expect since it can save a huge amount of money on a large database, it's part of an (expensive) add on.
- SomeOther 4y agoOracle can also do it autonomously if you have the super duper expensive package. It finds useful indexes based on what's queried regularly, tries them out behind the scenes to see if it'd improve things, and then creates them if they'd be useful.
- ayende 4y agoRavenDB has this feature, but it will also go ahead and create the relevant indexes needed on the fly. It is able to do so without harming production performance. See: https://ravendb.net/learn/inside-ravendb-book/reader/4.0/9-querying-in-ravendb#the-query-optimizer https://ravendb.net/learn/inside-ravendb-book/reader/4.0/9-q...