How check execution plan of a function

From: "Sabin Coanda" <sabin(dot)coandaSPAMPROTECTION(at)deuromedia(dot)ro>
To: pgsql-performance(at)postgresql(dot)org
Subject: How check execution plan of a function
Date: 2010-04-07 12:47:54
Message-ID: hphv0u$18f$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi there,

I have a function which returns setof record based on a specific query.
I try to check the execution plan of that query, so I write EXPLAIN ANALYZE
before my select, I call the function and I see the result which shows an
actual time about 5 seconds. But when I call my function after I remove
EXPLAIN ANALYZE it takes more than 300 seconds, and I cancel it.

What's happen, or how can I see the function execution plan to optimize it ?

TIA,
Sabin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2010-04-07 12:51:17 Re: LIMIT causes planner to do Index Scan using a less optimal index
Previous Message Sherry.CTR.Zhu 2010-04-07 12:20:54 Re: LIMIT causes planner to do Index Scan using a less optimal index