Re: Views with unions

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Mariusz Czułada <manieq(at)idea(dot)net(dot)pl>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Views with unions
Date: 2003-02-16 18:05:34
Message-ID: 20030216095555.K94589-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-02-16 18:51:18 Re: Views with unions
Previous Message Mariusz Czułada 2003-02-16 08:19:06 Re: Views with unions