Index Advice in PG

Поиск
Список
Период
Сортировка
От Jony Cohen
Тема Index Advice in PG
Дата
Msg-id CAD9xk1-Cba6iS0Bm_mvrm33qQ38+rmc7sk3eamUnrFM-PXuFhA@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi list,
I am happy to announce the new release of pg_idx_advisor version 0.1.2.
This is a PostgreSQL extension which allows a user to get index advice from the DB optimizer.

It's the first "stable" release so please don't go running this on your production environment :) 
But, I'd greatly appreciate any comments/thoughts/issues/pull requests...

It's fairly simple to use:
1. # create extension pg_idx_advisor;
2. # load '$libdir/plugins/pg_idx_advisor.so';
and then run explain on the queries you'd like to get advice on:
3. # explain select * from t where a = 100;INFO:
** Plan with original indexes **

                                   QUERY PLAN
--------------------------------------------------------------------------------
 Seq Scan on t  (cost=0.00..36.75 rows=11 width=8)
   Filter: (a = 100)

 ** Plan with hypothetical indexes **
 read only, advice, index: create index on t(a)
 Bitmap Heap Scan on t  (cost=4.12..14.79 rows=11 width=8)
   Recheck Cond: (a = 100)
   ->  Bitmap Index Scan on <V-Index>:114699  (cost=0.00..4.11 rows=11 width=0)
         Index Cond: (a = 100)
(9 rows)

You can get it from the postgres extension network: 
Or directly from GitHub:

Regards,
 - Jony

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump 8.4.9 failing after upgrade to openssl-1.0.1e-30.el6_6.11.x86_64 on redhat linux
Следующее
От: William Dunn
Дата:
Сообщение: pg_class.reltuples VS pg_stat_all_tables.n_live_tup for estimation of table