From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tod McQuillin <devin@spamcop.net>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Eh?
Date: Tue, 14 Aug 2001 10:27:29 -0400
Message-ID: <17433.997799249@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.GSO.4.33.0108140029260.22208-100000@sysadmin>
References: <Pine.GSO.4.33.0108140029260.22208-100000@sysadmin>
Tod McQuillin <devin@spamcop.net> writes:
> This makes me wonder... in the case of a stored complex view, would it be
> helpful to ask PostgreSQL to spend extra time in query optimisation and
> then cache the result? Or does it do this already?
I don't see any value in caching plans for views as such. The planner
considers each query as a whole, which it has to do for performance.
Example:
create view v as select * from foo;
select * from v where bar = 42;
If there's an index on foo.bar, you'd want this query to use it, no?
So the plan has to be formed on the basis of the actual query; there's
no way to pull out the part for a view.
regards, tom lane
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, devin@spamcop.net, josh@agliodbs.com
Subject: Re: Eh?
In-Reply-To: <17433.997799249@sss.pgh.pa.us>
* 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