Re: Cached Query Plans

From: James Mansion <james(at)mansionfamily(dot)plus(dot)com>
To:
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cached Query Plans
Date: 2008-04-13 08:23:01
Message-ID: 4801C2E5.3040605@mansionfamily.plus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Would it be possible to store plans with an indication of the
search path that was used to find tables, and for temp tables
some snapshot of the statistics for the table if any?

My suspicions are that:

* where you have a lot of short-lived connections then actually
they will often use the default search path - or a similar one

* if a temp table is in use then normally these will be small or
contain 'similar' data

There is a danger that these heuristics will be poor if long-running
connections are in play - but they have no excuse not to do their
own preparation.

Perhaps you could have named cache segments and connections
could 'opt in' to a cache segment if they want such sharing?

James

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message PFC 2008-04-13 12:26:04 Re: Cached Query Plans (was: global prepared statements)
Previous Message Brendan Jurd 2008-04-13 08:11:46 Re: [HACKERS] Show INHERIT in \du