Show HN: PostgreSQL index advisor
399 by kiwicopple | 95 comments .
This is a Postgres extension that can determine if a query should have an index. For example, for this table: create table book( id int primary key, title text not null ); You can run `index_advisor()` to see if there should be an index on a select statement: select * from index_advisor('select book.id from book where title = $1'); And it will return (summarized): {"CREATE INDEX ON public.book USING btree (title)"} It works particularly well with pg_stat_statements[0] which tracks execution statistics of all SQL statements executed on your Postgres database. It leans heavily on HypoPG[1], an excellent extension to determine if PostgreSQL will use a given index without spending resources to create them. [0] pg_stat_statements: https://ift.tt/JDbKlnQ... [1] https://ift.tt/F10kP9N
Subscribe to:
Post Comments (Atom)
New best story on News: DeepMind's WeatherNext model achieves breakthrough forecasting cyclones
DeepMind's WeatherNext model achieves breakthrough forecasting cyclones 388 by bhavansig | 116 comments on News.
-
Deep Reinforcement Learning: Zero to Hero 484 by alessiodm | 43 comments on News.
-
Next.js is infuriating 843 by Bogdanp | 473 comments .
-
France to ditch Windows for Linux to reduce reliance on US tech 451 by Teever | 185 comments on
No comments:
Post a Comment