Re: what's the slowest part in the SQL

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: what's the slowest part in the SQL
Дата
Msg-id CAGTBQpZfyj9252RYGY7+EL540mXxd4dRTRGZtQWYFJm63Byj2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: what's the slowest part in the SQL  (Suya Huang <shuang@connexity.com>)
Ответы Re: what's the slowest part in the SQL
Список pgsql-performance
On Tue, Aug 9, 2016 at 9:12 PM, Suya Huang <shuang@connexity.com> wrote:
> Hi Claudio,
>
> The plan for dog is exactly the same as what’s for cat, thus I didn’t paste them here.

Are you sure?

The plan itself may be the same, but the numbers may be different, and
in fact be key to understanding the problem.

>
> Richard Albright just pointed that it’s because the result has been cached not the table, I think that makes sense.
Somy question changes to the efficiency of NESTED LOOP JOIN, 400 rows for 4 seconds, sounds slow to me. Is that normal? 

From the looks of those timing numbers, everything involving reads
from disk is slower on the first run. That clearly points to disk
cache effects. So this explain looks completely normal.

If the query for "dog" doesn't get a speedup on second runs, it could
just be that the data it visits doesn't fit in disk cache, so the
numbers are important, they can tell you that.


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

Предыдущее
От: Suya Huang
Дата:
Сообщение: Re: what's the slowest part in the SQL
Следующее
От: Suya Huang
Дата:
Сообщение: Re: what's the slowest part in the SQL