Re: [PERFORM] Inaccurate Explain Cost

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: [PERFORM] Inaccurate Explain Cost
Дата
Msg-id 20120926202140.GB10681@depesz.com
обсуждение исходный текст
Ответ на Inaccurate Explain Cost  (Robert Sosinski <rsosinski@ticketevolution.com>)
Ответы Re: [PERFORM] Inaccurate Explain Cost  (Samuel Gendler <sgendler@ideasculptor.com>)
Re: [PERFORM] Inaccurate Explain Cost  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
On Wed, Sep 26, 2012 at 02:38:09PM -0400, Robert Sosinski wrote:
> The first query shows a cost of 190,169.55 and runs in 199,806.951 ms.
> When I disable nested loop, I get a cost of 2,535,992.34 which runs in
> only 133,447.790 ms.  We have run queries on our database with a cost
> of 200K cost before and they ran less then a few seconds, which makes
> me wonder if the first query plan is inaccurate.  The other issue is
> understanding why a query plan with a much higher cost is taking less
> time to run.

Are you under impression that cost should be somehow related to actual
time?
If yes - that's not true, and afaik never was.
the fact that you got similar time and cost is just a coincidence.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/


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

Предыдущее
От: Edson Richter
Дата:
Сообщение: Re: [PERFORM] Inaccurate Explain Cost
Следующее
От: Alexander Reichstadt
Дата:
Сообщение: SELECT …. WHERE id is in pool of ids of subquery……