On Thu, Jun 5, 2014 at 9:54 AM, Linos <info(at)linos(dot)es> wrote:
> What I don't understand is why the statistics have this bad information, all my tests are done on a database just restored and analyzed. Can I do something to improve the quality of my database statistics and let the planner do better choices? Maybe increase the statistics target of the columns involved?
By that I meant row count estimates coming out of the joins are way
off. This is pushing the planner into making bad choices. The most
pervasive problem I see is that the row count estimate boils down to
'1' at some juncture causing the server to favor nestloop/index scan
when something like a hash join would likely be more appropriate.
merlin