Re: stored procedure stats in collector
| От | Tom Lane |
|---|---|
| Тема | Re: stored procedure stats in collector |
| Дата | |
| Msg-id | 19469.1184550839@sss.pgh.pa.us обсуждение |
| Ответ на | stored procedure stats in collector (Martin Pihlak <martin.pihlak@gmail.com>) |
| Ответы |
Re: stored procedure stats in collector
|
| Список | pgsql-hackers |
Martin Pihlak <martin.pihlak@gmail.com> writes:
> I'm working on a patch to extend the stats collector to handle stored procedure
> statistics (call counts, duration etc).
> ...
> Only functions with oid >= FirstNormalObjectId are accounted.
I really dislike that approach to deciding which functions to count.
The main problem with it is that it will try to count C-language
functions that are added after initdb, such as contrib stuff and
third-party add-ons like postgis. The percentage overhead for a
typical short C function will be large, and I'm not sure anything
much is to be gained by counting these.
I think a more reasonable approach would be to count PL-language
functions; which in turn suggests that the instrumentation hooks
should be in the PL call handlers, not in ExecMakeFunctionResult
and friends where they will drag down performance of all functions.
BTW, I dunno if you've thought about the implications of inlining
of SQL functions ... it's hard to see how to count those reasonably.
regards, tom lane
В списке pgsql-hackers по дате отправления: