Re: Function scan/Index scan to nested loop - Mailing list pgsql-performance

From Robert Haas
Subject Re: Function scan/Index scan to nested loop
Date
Msg-id AANLkTimT_CB9tkiYynpsLtjhLjOJ6xkiLYeG2prHLWC-@mail.gmail.com
Whole thread Raw
In response to Re: Function scan/Index scan to nested loop  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
List pgsql-performance
On Tue, May 11, 2010 at 2:00 PM, Carlo Stonebanks
<stonec.register@sympatico.ca> wrote:
> I am concerned that there is such a lag between all the index and function
> scans start/complete times and and the nested loops starting. I have
> reformatted the SLOW PLAN results below to make them easier to read. Can you
> tell me if this makes any sense to you?

I think you want to run EXPLAIN ANALYZE on the queries that are being
executed BY mdx_core.zips_in_mile_range('75203', 15::numeric) rather
than the query that calls that function.  You should be able to see
the same caching effect there and looking at that plan might give you
a better idea what is really happening.

(Note that you might need to use PREPARE and EXPLAIN EXECUTE to get
the same plan the function is generating internally, rather than just
EXPLAIN.)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

pgsql-performance by date:

Previous
From: David Jarvis
Date:
Subject: Re: Random Page Cost and Planner
Next
From: Robert Haas
Date:
Subject: Re: Performance issues when the number of records are around 10 Million