Re: [PERFORM] Slower query after psql changed it's execution plan

2009-03-23 Thread Tom Lane
Romuald Brunet writes: > After some investigation, we found out that the PostgreSQL server > (8.1) changed the execution plan (I'm assuming because the number of > rows increased). The problem seems to be that the estimate for the number of rows fetched from dc_post changed drastically --- it was

Re: [PERFORM] Slower query after psql changed it's execution plan

2009-03-23 Thread Kevin Grittner
Romuald Brunet wrote: > The statistics are at the default value everywhere (10) Try setting that to 100 and running ANALYZE. The small size of the sample with the default of 10 happened to land you with a bad estimate this time. (If the numbers it has were actually representative of the data