Re: How to see detailed plan of a funciton - Mailing list pgsql-novice

From Andreas Seltenreich
Subject Re: How to see detailed plan of a funciton
Date
Msg-id 87iru1hv3m.fsf@gate450.dyndns.org
Whole thread Raw
In response to How to see detailed plan of a funciton  ("Obe, Regina DND\\MIS" <robe.dnd@cityofboston.gov>)
List pgsql-novice
Regina Obe writes:

> I have a pgsql function that returns a set of records and I'm trying to
> optimize it.
>
> Needless to say it goes thru several selects and appends to the final
> result.  I was wondering how I can see the query plan without having to
> write things out piece meal.

You could enable logging of plans and timings using some GUC
variables:

<http://www.postgresql.org/docs/8.1/static/runtime-config-statistics.html>
<http://www.postgresql.org/docs/8.1/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT>

The output is different from explain's, but most of the information
should be there.

regards,
Andreas

pgsql-novice by date:

Previous
From: John DeSoi
Date:
Subject: Re: Pl/pgsql import
Next
From: "Luis Silva"
Date:
Subject: trigger function with arguments from a sql command