Re: Views with unions - Mailing list pgsql-performance

From Stephan Szabo
Subject Re: Views with unions
Date
Msg-id 20030216095555.K94589-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Views with unions  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Views with unions
List pgsql-performance
On Sat, 15 Feb 2003, Josh Berkus wrote:

> Mariusz,
>
> > While testing multi-select views I found some problems. Here are details. I
> > have 3 tables and I created a view on them:
>
> What version of PostgreSQL are you using?   UNION views optimized extremely
> poorly through 7.2.4; things have been improved in 7.3

Yeah, but I think what he's hoping is that it'll notice that
"key=1 and key=3" would be noticed as a false condition so that it doesn't
scan those tables since a row presumably can't satisify both. The question
would be, is the expense of checking the condition for all queries
greater than the potential gain for these sorts of queries.  In addition,
you'd have to be careful to make it work correctly with operator
overloading, since someone could make operators whose semantics in
cross-datatype comparisons are wierd.


pgsql-performance by date:

Previous
From: Mariusz Czułada
Date:
Subject: Re: Views with unions
Next
From: Tom Lane
Date:
Subject: Re: Views with unions