Re: Unions and where optimisation

From: Boris Klug <boris(dot)klug(at)control(dot)de>
To: Tomasz Myrta <jasiek(at)klaster(dot)net>, Hannu Krosing <hannu(at)tm(dot)ee>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Unions and where optimisation
Date: 2003-01-08 14:36:33
Message-ID: 200301081536.33211.boris.klug@control.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Hello!

> Hannu, does it work?
> Few months ago I lost some time trying to create this kind of query and
> I always got error, that subselect doesn't knows anything about upper
> (outer?) table.

It does not work on my PostgreSQL 7.2.x

Get the same error like you: "relation rk does not exist"

Also the disadvantage of this solution is that the speed up is bound to
queries for the ordernr. If a statement has a where clause e.g. for a
timestamp, the view is still slow.

Does PostgreSQL not know how to move where clause inside each select in a
union?

--
Dipl. Inform. Boris Klug, control IT GmbH, Germany

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tomasz Myrta 2003-01-08 14:40:43 Re: Unions and where optimisation
Previous Message Tomasz Myrta 2003-01-08 14:32:11 Re: Unions and where optimisation