From: Jim C. Nasby <decibel@decibel.org>
To: Mr Pink <mr_pink_is_the_only_pro@yahoo.com>
Cc: Scott Kirkwood <scottakirkwood@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Caching of Queries
Date: Mon, 27 Sep 2004 14:18:36 -0500
Message-ID: <20040927191836.GS1297@decibel.org> (raw)
In-Reply-To: <20040923152925.18234.qmail@web41114.mail.yahoo.com>
References: <b3dc511704092212502a2ddb09@mail.gmail.com>
<20040923152925.18234.qmail@web41114.mail.yahoo.com>
On Thu, Sep 23, 2004 at 08:29:25AM -0700, Mr Pink wrote:
> Not knowing anything about the internals of pg, I don't know how this relates, but in theory,
> query plan caching is not just about saving time re-planning queries, it's about scalability.
> Optimizing queries requires shared locks on the database metadata, which, as I understand it
> causes contention and serialization, which kills scalability.
One of the guru's can correct me if I'm wrong here, but AFAIK metadata
lookups use essentially the same access methods as normal queries. This
means MVCC is used and no locking is required. Even if locks were
required, they would be shared read locks which wouldn't block each
other.
--
Jim C. Nasby, Database Consultant decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: decibel@decibel.org, mr_pink_is_the_only_pro@yahoo.com, scottakirkwood@gmail.com
Subject: Re: Caching of Queries
In-Reply-To: <20040927191836.GS1297@decibel.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox