Show HN: PostgreSQL index advisor
399 by kiwicopple | 95 comments on Hacker News.
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/Sz1mBA9... [1] https://ift.tt/YIer6Tj
New best story on Hacker News: Carnegie Mellon is putting computer science courses on YouTube for free
Carnegie Mellon is putting computer science courses on YouTube for free 551 by pcompeau | 89 comments on Hacker News.
-
рддेрдЬрд╕्рд╡िрдиी рдкрддрд╕ंрд╕्рдеेрдЪ्рдпा рдШोрдЯाрд│ेрдмाрдЬ рдкрджाрдзिрдХाрд░ी, рд╕ंрдЪाрд▓рдХांрд╡рд░ рдЧुрди्рд╣े рджाрдЦрд▓ рд▓ेрдЦाрдкрд░ीрдХ्рд╖рдХ рдмрдирд╕ोрдб рдпांрдЪ्рдпा рддрдХ्рд░ाрд░ीрдиंрддрд░ рдкोрд▓िрд╕ांрдЪी рдХाрд░рд╡ाрдИ рд╡рд░ोрд░ा ...
-
рдиिрдЦिрд▓ рдоांрдбрд╡рдХрд░ рдпांрдЪी рдпुрд╡ाрд╕ेрдиा рдЙрдкрдЬिрд▓्рд╣ा рдк्рд░рдоुрдЦ (рд╡рд░ोрд░ा, рдЪिрдоूрд░, рдм्рд░рдо्рд╣рдкुрд░ी) рдкрджाрд╡рд░ рдиिрдпुрдХ्рддी рд╡рд░ोрд░ा : рд╣िंрджुрд╣ृрджрдпрд╕рдо्рд░ाрдЯ рд╢िрд╡рд╕ेрдиाрдк्рд░рдоुрдЦ рдмाрд│...
-
рд╡рд░ोрд░ा рднाрдЬрдкा рдкрд░िрд╡ाрд░ाрдд рдирд╡े рд╕рджрд╕्рдп – рд╡िрдХाрд╕ рдкрд░рдЪाрдХे рдпांрдЪा рднाрдЬрдкा рдк्рд░рд╡ेрд╢ рд╡рд░ोрд░ा : рд╡рд░ोрд░ा-рднрдж्рд░ाрд╡рддी рд╡िрдзाрдирд╕рднा рдХ्рд╖ेрдд्рд░ाрдЪे рдЖрдорджाрд░ рдХрд░рдг рджाрджा рджेрд╡...