Skip site navigation (1) Skip section navigation (2)

Re: Function scan/Index scan to nested loop

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Carlo Stonebanks <stonec(dot)register(at)sympatico(dot)ca>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Function scan/Index scan to nested loop
Date: 2010-05-26 04:13:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Tue, May 11, 2010 at 2:00 PM, Carlo Stonebanks
<stonec(dot)register(at)sympatico(dot)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

Robert Haas
The Enterprise Postgres Company

In response to

pgsql-performance by date

Next:From: Robert HaasDate: 2010-05-26 04:25:56
Subject: Re: Performance issues when the number of records are around 10 Million
Previous:From: David JarvisDate: 2010-05-26 03:50:09
Subject: Re: Random Page Cost and Planner

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group