Re: Caching of Queries

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Caching of Queries
Дата
Msg-id 20040927191836.GS1297@decibel.org
обсуждение исходный текст
Ответ на Re: Caching of Queries  (Mr Pink <mr_pink_is_the_only_pro@yahoo.com>)
Список pgsql-performance
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?"

В списке pgsql-performance по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: best statistic target for boolean columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: best statistic target for boolean columns