Re:dbdev - The Database Package Manager for PostgreSQL Trust...
by noob4life on Friday April 14, 2023 @12:44PM
(#35571591)
How does `index_advisor` work?
[ Parent
| on HN ]
Re:dbdev - The Database Package Manager for PostgreSQL Trust...
by oliverrice on Friday April 14, 2023 @12:49PM
(#35571657)
index_advisor is a project that almost made the cut for LW7. We decided to launch it as a pgtle instead to get some feedback before we (spoiler) probably release it in LW8
It uses the hypopg package to very quickly generate an index for each column referenced in the query and then re-run's an explain plan to measure the estimated "total cost".
If the expected "total_cost" reduces, we add the indexes to the list of recommendations and continue testing the remaining columns.
Its currently limited to single column indexes only but in a later update we'll enhance that to do more comprehensive searches with multiple columns in a single index
Re:dbdev - The Database Package Manager for PostgreSQL Trust...
by claytongulick on Friday April 14, 2023 @12:59PM
(#35571798)
Cool idea for an extension!
I had a whole set of comments about concerns about doing this to a large table in prod, and statistics and such - then I read about hypopg.
What a neat package, learned something new today.