Re: performance issue with a PL/pgSQL function
| От | Tom Lane |
|---|---|
| Тема | Re: performance issue with a PL/pgSQL function |
| Дата | |
| Msg-id | 1931205.1776230381@sss.pgh.pa.us обсуждение |
| Ответ на | Re: performance issue with a PL/pgSQL function (OMPRAKASH SAHU <sahuop2121@gmail.com>) |
| Список | pgsql-admin |
OMPRAKASH SAHU <sahuop2121@gmail.com> writes:
> I am using a temp table name 5 to 6 times, by storing the data temporarily
> and handing over to other temp and then drop & create temp_table with same
> name to store next temporary data,
That's definitely an anti-pattern. Can you TRUNCATE the temp table
instead of drop-n-recreate?
> Seeing the query plan just by running explain is hectic in case of
> function having more than 4k lines of code, can you please help me if
> there is any tool to check the whole execution plan for a function just
> like we get for a select query.
There's no "whole execution plan" for a function, only for individual
queries within it. You might find auto_explain (with
log_nested_statements turned on) to be useful to capture those query
plans.
regards, tom lane
В списке pgsql-admin по дате отправления: