Skip site navigation (1) Skip section navigation (2)

Re: Caching of Queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Aaron Werman" <awerman2(at)hotmail(dot)com>
Cc: "Iain" <iain(at)mst(dot)co(dot)jp>, "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Caching of Queries
Date: 2004-09-28 13:58:01
Message-ID: 14083.1096379881@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Aaron Werman" <awerman2(at)hotmail(dot)com> writes:
> I imagine a design where a shared plan cache would consist of the plans,
> indexed by a statement hash and again by dependant objects.  A statement to
> be planned would be hashed and matched to the cache. DDL would need to
> synchronously destroy all dependant plans. If each plan maintains a validity
  ^^^^^^^^^^^^^
> flag, changing the cache wouldn't have to block so I don't see where there
                           ^^^^^^^^^^^^^^^^^^^^^^
> would be contention.

You have contention to access a shared data structure *at all* -- for
instance readers must lock out writers.  Or didn't you notice the self-
contradictions in what you just said?

Our current scalability problems dictate reducing such contention, not
adding whole new sources of it.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Robert CreagerDate: 2004-09-28 14:19:57
Subject: This query is still running after 10 hours...
Previous:From: Aaron WermanDate: 2004-09-28 13:04:34
Subject: Re: Caching of Queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group