Re: [PERFORM] NestedLoops over BitmapScan question

2012-10-01 Thread Виктор Егоров
Well, I've managed to track down the cause of improper plans. Due to the data distribution n_distinct had been estimated way too low. I've manually set it to be 195300 instead of 15500 (with stats_target=200): select tablename,attname,null_frac,avg_width,n_distinct,correlation from pg_stats whe

[PERFORM] NestedLoops over BitmapScan question

2012-09-28 Thread Виктор Егоров
Greetings. I have a small monitoring query on the following tables: select relname,relpages,reltuples::numeric(12) from pg_class where relname in ('meta_version','account') order by 1; relname| relpages | reltuples --+--+--- account | 3235 |197723