From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
Cc: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: AW: AW: Is stats update during COPY IN really a good id ea? |
Date: | 2001-05-22 12:40:41 |
Message-ID: | 200105221240.f4MCefV05311@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I actually do get perfect query plans without any stats, because
> our indexes are perfectly matched to our statements, and in two
> cases we tuned the sql appropriately (2 of >200 statements with
> Informix optimizer hints). For such a condition you actually
> want a rule based optimizer. The current default values during
> create table are more or less chosen to give exactly this "rule
> based" behavior. The trouble is, that after the first implicitly
> created stats, the optimizer goes completely bananas, because
> now he thinks that one table has 1000 (the default) rows (it
> actually has 10000000), but the other has 100000 and the optimizer
> now knows that and chooses a different plan. And just because
> you copy a few rows ?
Oh, that is interesting. You didn't explicitly ask for stats, but got
them anyway and that caused a problem.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Klaus Reger | 2001-05-22 12:42:21 | Re: Grammar-problems with pl/pgsql in gram.y |
Previous Message | Zeugswetter Andreas SB | 2001-05-22 12:31:19 | AW: AW: Is stats update during COPY IN really a good id ea? |