Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3

Поиск
Список
Период
Сортировка
От Shaun Thomas
Тема Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3
Дата
Msg-id 4D8102CC.5060309@peak6.com
обсуждение исходный текст
Ответ на Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-performance
On 03/16/2011 12:44 PM, Kevin Grittner wrote:

> Well, that's one way of looking at it.  Another would be that the
> slower plan with the backward scan was only estimated to be 14.5%
> less expensive than the fast plan, so a pretty moderate modifier
> would have avoided this particular problem.

I was wondering about that myself. Considering any backwards scan would
necessarily be 10-100x slower than a forward scan unless the data was on
an SSD, I assumed the planner was already using a multiplier to
discourage its use.

If not, it seems like a valid configurable. We set our random_page_cost
to 1.5 once the DB was backed by NVRAM. I could see that somehow
influencing precedence of a backwards index scan. But even then, SSDs
and their ilk react more like RAM than even a large RAID... so should
there be a setting that passes such useful info to the planner?

Maybe a good attribute to associate with the tablespace, if nothing else.

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
sthomas@peak6.com

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3