> Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> >> Something is fishy here. Have you done a "vacuum analyze" since loading
> >> the data in these tables?
>
> > Oh, I never thought about that.
>
> Ah. OK, that explains the system's poor choice of plan --- it was
> effectively operating on the assumption that these tables were small.
>
> (Note to hackers: maybe a freshly created table should be given dummy
> statistics, say having 1000 rows instead of 0 rows? That would help
> to prevent the optimizer from making really foolish choices when no
> vacuum's been done yet for the table. But I dunno whether we could
> invent plausible default values for all the stats...)
No way to really make a default. Zero is the correct number when the
table is created, right? Improved optimize may be even worse or better
for un-analyzed tables.
-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026