Re: Cached Query Plans

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, PFC <lists(at)peufeu(dot)com>, Dawid Kuroczko <qnex42(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cached Query Plans
Date: 2008-04-14 15:01:47
Message-ID: 1208185307.8259.292.camel@PCD12478
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2008-04-14 at 10:55 -0400, Mark Mielke wrote:
> The other ideas about automatically deciding between plans based on
> ranges and such strike me as involving enough complexity and logic, that
> to do properly, it might as well be completely re-planned from the
> beginning to get the most benefit.

... except if you hard-wire the most common alternative plans, you still
get the benefit of cached plan for a wider range of parameter values.
Not to mention that if you know you'll cache the plan, you can try
harder planning it right, getting possibly better plans for complex
queries... you could argue that complex queries tend not to be repeated,
but we do have here some which are in fact repeated a lot in batches,
then discarded. So I guess a cached plan discard/timeout mechanism would
also be nice.

Cheers,
Csaba.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message PFC 2008-04-14 15:08:25 Re: Cached Query Plans (was: global prepared statements)
Previous Message Mark Mielke 2008-04-14 14:55:58 Re: Cached Query Plans