On Wed, 7 May 2003, Achilleus Mantzios wrote:
>
> Hi, few days ago, i posted some really wierd (at least to me)
> situation (maybe a potentian bug) to the performance and bugs list
> and to some core hacker(s) privately as well,
> and i got no response.
> Moreover i asked for some feedback
> in order to understand/fix the problem myself,
> and again received no response.
>
> What i asked was pretty simple:
> "1. Is it possible that the absense of statistics make the planer produce
> better plans
> than in the case of statistcs generated with vacuum
> analyze/analyze?
One of the common examples of this happening was posted a few weeks back.
someone was basically doing this:
delete from table;
analyze table;
insert into table (1,000,000 times);
the problem was that the table had fk constraints to another table, and
the query planner for the inserts (all 1,000,000 of them) assumed it was
inserting into a mostly empty table, and therefore used seq scans instead
of index scans.
It's not a bug, not quite a feature, just a corner case.