Re: contrib/pg_stat_statements

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: contrib/pg_stat_statements
Дата
Msg-id 20081027163356.ADCD.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: contrib/pg_stat_statements  (Martin Pihlak <martin.pihlak@gmail.com>)
Ответы Re: contrib/pg_stat_statements  (Hannu Krosing <hannu@2ndQuadrant.com>)
Re: contrib/pg_stat_statements  (Martin Pihlak <martin.pihlak@gmail.com>)
Список pgsql-hackers
Martin Pihlak <martin.pihlak@gmail.com> wrote:

> ITAGAKI Takahiro wrote:
> > I'd like to submit pg_stat_statements contrib module
> > 
> Nice work! There is one feature I'd like to request -- we need to be able
> to also track nested statements. This would greatly simplify diagnosing
> performance problems in complex stored procedures. Perhaps the GUC
> track_statements could be made an enum - none, top, all?

I tried your request, but found it's hard to determine query text
where the executing plan comes. We can get the query text from
ActivePortal->sourceText only for top statements. Stored procedures
doesn't use portals and uses executor directly.

It might be possbile to add a queryText field into QueryDesc
and all of the codes using QueryDesc initialize the field with
their own query texts, but it requires modifications in many
different modules and copying query text might be needed.
I don't want to do it only for this contrib module,
so I'll support only top statements at the moment. Sorry.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




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

Предыдущее
От: Ron Mayer
Дата:
Сообщение: Re: new correlation metric
Следующее
От: ITAGAKI Takahiro
Дата:
Сообщение: contrib/pg_stat_statements v2