Re: Common slow query reasons - help with a special log

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Common slow query reasons - help with a special log
Дата
Msg-id 4EE41F5A.60305@fuzzy.cz
обсуждение исходный текст
Ответ на Re: Common slow query reasons - help with a special log  (Daniel Cristian Cruz <danielcristian@gmail.com>)
Список pgsql-performance
On 11.12.2011 02:27, Daniel Cristian Cruz wrote:
> I would start with 5 seconds.
>
> Reading the manual again and I saw that enabling analyze, it analyze all
> queries, even the ones that wasn't 5 second slower. And understood that
> there is no way to disable for slower queries, since there is no way to
> know it before it ends...

Yes, you can't predict how long a query will run until it actually
finishes, so you have to instrument all of them. Maybe this will change
because of the "faster than light" neutrinos, but let's stick with the
current laws of physics for now.

> I read Bruce blog about some features going to multi-core. Could explain
> analyze go multi-core too?

I don't think so. This is what Bruce mentioned as "parallel execution"
and that's the very hard part requiring rearchitecting parts of the system.

> Another thing I saw is that I almost never look at times in explain
> analyze. I always look for rows divergence and methods used for scan and
> joins when looking for something to get better performance.
>
> I had the nasty idea of putting a // before de gettimeofday in the code
> for explain analyze (I guess it could be very more complicated than this).

I was thinking about that too, but I've never done it. So I'm not sure
what else is needed.

Tomas

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

Предыдущее
От: Jon Nelson
Дата:
Сообщение: Re: copy vs. C function
Следующее
От: "Anibal David Acosta"
Дата:
Сообщение: autovacuum, exclude table