Re: Unions and where optimisation - Mailing list pgsql-performance

From Boris Klug
Subject Re: Unions and where optimisation
Date
Msg-id 200301081536.33211.boris.klug@control.de
Whole thread Raw
In response to Re: Unions and where optimisation  (Tomasz Myrta <jasiek@klaster.net>)
List 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

pgsql-performance by date:

Previous
From: Tomasz Myrta
Date:
Subject: Re: Unions and where optimisation
Next
From: Hannu Krosing
Date:
Subject: Re: Unions and where optimisation