From: Oliver Jowett <oliver@opencloud.com>
To: pg@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: cacheing metadata
Date: Fri, 04 Jun 2004 09:30:07 +1200
Message-ID: <40BF985F.1000802@opencloud.com> (raw)
In-Reply-To: <1076992127.6799.153.camel@localhost.localdomain>
References: <1076992127.6799.153.camel@localhost.localdomain>
Dave Cramer wrote:
> There is some interest in caching meta-data. I am wondering what the
> community thinks of the idea.
Are there really metadata-query-heavy apps out there that would benefit?
Do you have an example of one? I'd have thought that most if not all
of the metadata-related tables would all be sitting in cache anyway.
It seems like this is a special case of the more general "I run
expensive queries and don't want to rerun them to pick up changes". And
a very special case at that -- metadata doesn't usually change very often.
If the app is essentially a UI frontend I'd say you could get away with
caching results in the app (not the driver) and having a "reload" button.
If the app really needs up-to-the-moment metadata state to control
whatever actions that follow, it'll need to hit the DB with the full
metadata query while in a transaction to get the right isolation
characteristics, won't it?
> Notionally it would be used to speed up DataBaseMetaData queries. It
> will require some work on the backend to create triggers on schema
> changes. This is being considered as we speak.
If you're going to be adding support triggers to every DB anyway, why
not bite the bullet and do a stored proc that maintains a cache table of
materialized metadata, or something similar?
-O
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, pg@fastcrypt.com
Subject: Re: cacheing metadata
In-Reply-To: <40BF985F.1000802@opencloud.com>
References: <1076992127.6799.153.camel@localhost.localdomain> <40BF985F.1000802@opencloud.com>
* 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