Oleg Bartunov wrote:
> =# set enable_seqscan=off;
> =# set plantuner.forbid_index='id_idx2';
The genius of this module is the line above -- a more fine-grained way
to control the optimizer, with specific index disabling.
> =# explain select id from test where id=1;
> QUERY PLAN
> ----------------------------------------------------------------------
> Bitmap Heap Scan on test (cost=4.34..15.03 rows=12 width=4)
> Recheck Cond: (id = 1)
> -> Bitmap Index Scan on id_idx (cost=0.00..4.34 rows=12 width=0)
> Index Cond: (id = 1)
> (4 rows)
Are you planning to submit this as a /contrib module?
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +