pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: andrew@pillette.com
To: Adnan DURSUN <a_dursun@hotmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: SQL Function Performance
Date: Sun, 12 Feb 2006 17:05:27 -0800
Message-ID: <200602130105.k1D15R726930@pillette.com> (raw)

If you have only recently analyzed the tables in the query, close your psql session (if that's what you were using) and then restart it. I've gotten burned by asking a query using the function, which I believe is when PG creates the plan for the function, and then making significant changes to the tables behind it (new index, bulk insert, etc.). By starting a new session, the function will be re-planned according to up to date statistics or using newly created indices.



view thread (16+ messages)  latest in thread

Message-ID: <200602130105.k1D15R726930@pillette.com>
Permalink:  ../200602130105.k1D15R726930@pillette.com/
Also on:    postgresql.org/message-id/200602130105.k1D15R726930@pillette.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andrew@pillette.com, a_dursun@hotmail.com
  Subject: Re: SQL Function Performance
  In-Reply-To: <200602130105.k1D15R726930@pillette.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox