On Tue, May 11, 2010 at 2:00 PM, Carlo Stonebanks <stonec.register@xxxxxxxxxxxx> 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 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance