On Dec 14, 2005, at 11:38 , Rick Gigger wrote:
> What actually fixes it is to run it a while and made sure there is
> a bunch of data there (even if it is deleted and not visible to
> anything) and run vacuum analyze. Then recreate the stored
> procedure. Then run the stored procedure.
What happens if you just run vacuum analyze before running the stored
procedure (i.e., skipping the recreate the stored procedure step)?
Running vacuum analyze (or at least just analyze) helps keep the
statistics used by the query planner up to date. Recreating the
function might just be a red herring.
Michael Glaesemann
grzm myrealbox com