Re: Hash join in 8.3

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Hash join in 8.3
Дата
Msg-id 87hcimnv8n.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Hash join in 8.3  (André Volpato<andre.volpato@ecomtecnologia.com.br>)
Список pgsql-general
André Volpato <andre.volpato@ecomtecnologia.com.br> writes:

> Gregory Stark escreveu:
>> André Volpato <andre.volpato@ecomtecnologia.com.br> writes:
>>
>> I think the answer is that if you have bad statistics you'll get a bad plan
>> and which bad plan is going to be pretty much random.
>>
> I believe the statistics are ok, I´ve runned vacuum analyze before all those
> tries.

Sorry, I should have said "bad estimates". That is, because of the

  j*1.5 BETWEEN 3000000 AND 4000000

clause the optimizer isn't going to be able to come up with a good estimate of
how many rows that will match. What plan it picks when it has such a bad
estimate is going to be pretty random, dependant on just what plans would be
good in a situation entirely unrelated to the reality.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's Slony Replication support!

В списке pgsql-general по дате отправления:

Предыдущее
От: André Volpato
Дата:
Сообщение: Re: Hash join in 8.3
Следующее
От: Reg Me Please
Дата:
Сообщение: Re: COPY speedup