Re: Query much slower when run from postgres function - Mailing list pgsql-performance

From Tom Lane
Subject Re: Query much slower when run from postgres function
Date
Msg-id 355.1236705647@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query much slower when run from postgres function  (fche@redhat.com (Frank Ch. Eigler))
Responses Re: Query much slower when run from postgres function
List pgsql-performance
fche@redhat.com (Frank Ch. Eigler) writes:
> For a prepared statement, could the planner produce *several* plans,
> if it guesses great sensitivity to the parameter values?  Then it
> could choose amongst them at run time.

We've discussed that in the past.  "Choose at runtime" is a bit more
easily said than done though --- you can't readily flip between plan
choices part way through, if you've already emitted some result rows.

            regards, tom lane

pgsql-performance by date:

Previous
From: henk de wit
Date:
Subject: Re: When does sequential performance matter in PG?
Next
From: Greg Smith
Date:
Subject: Re: When does sequential performance matter in PG?