From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Gaetano Mendola <mendola(at)bigfoot(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Union strange explain |
Date: | 2002-07-05 16:15:27 |
Message-ID: | 20020705091034.W27508-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Fri, 5 Jul 2002, Gaetano Mendola wrote:
> Stephan wrote:
> > number of rows returned). I think there was some question about
> > whether it was safe to do that optimization (ie,
> > is select * from (a union [all] b) where condition
> > always the same as
> > select * from a where condition union [all]
> > select * from b where condition
> > )
>
> Yes but with a View the condition is always extern.
> I'm understanding that I don't have any possibility to
> optimize that view, I'm wrong ?
Right now, I don't think there's much you can do using
a view.
Until we at least think we know what the safe conditions
are to make that optimization, we can't do so since we
might return incorrect results if the optimization is
performed in a place it doesn't apply. If you want
to do the legwork to show what (if any conditions)
need to be met to do the optimization, we'd certainly
be happy. :)
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Boes | 2002-07-05 17:18:22 | WAL files in 7.2 vs. 7.1 |
Previous Message | Christopher Smith | 2002-07-05 16:13:20 | vaccumdb vacuum memory usage |