Re: EXPLAIN/EXPLAIN ANALYSE for pl/pgsql functions

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Hannu Krosing" <hannu(at)skype(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: EXPLAIN/EXPLAIN ANALYSE for pl/pgsql functions
Date: 2007-04-23 10:27:07
Message-ID: 1177324028.3650.191.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2007-04-23 at 11:01 +0300, Hannu Krosing wrote:
> How much effort would it be to add EXPLAIN/EXPLAIN ANALYSE capability to
> pl/pgsql functions?
>
> what I mean, is either a special mode, where "SELECT my_plpgsql_func()"
> would print all query plans instead or in addition to executing them, or
> some way for EXPLAIN to pass some flags to functions so that they can
> "do the right thing".

I agree this is an important thing to have.

Index Advisor patch contains a solution to this issue: All SQL can be
explained, without needing to put the EXPLAIN keyword in front of each
SQL statement prior to execution. The next part of the functionality is
to re-run the EXPLAIN with hypothetical indexes, to see if the plan
would improve.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-04-23 11:12:30 Re: Dead Space Map version 3 (simplified)
Previous Message Simon Riggs 2007-04-23 10:14:05 Re: [PATCH] A crash and subsequent recovery of themaster can cause the slave to get out-of-sync