Re: views: performance implication

From: Curt Sampson <cjs(at)cynic(dot)net>
To: John Moore <wx-chase(at)tinyvital(dot)com>
Cc: Postgresql Admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: views: performance implication
Date: 2002-07-08 03:03:03
Message-ID: Pine.NEB.4.44.0207081201030.476-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, 4 Jul 2002, John Moore wrote:

> We hope to use views as a way to....
> So the question is: are there any negative performance implications of
> doing so ... Back in the old days, views were a
> performance no-no in Informix, so I want to be sure we aren't setting a big
> trap for ourselves.

Yes, there may be. There are some cases where the optimizer won't
optimize a view the way it will optimize an equivalant query. (I posted
a query about this a while back--I don't remember whether it was here
or on -hackers.) So after creating a view, you'll want to check with
EXPLAIN that you're still getting the same query plan.

But I don't think this is true of every view, just some of them.

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Simeone, Mario 2002-07-08 07:41:36 help
Previous Message ozric tentacle 2002-07-07 18:34:47 HELP FOR POSTGRESQL NEEDED...