From: Boris Klug <boris.klug@control.de>
To: Tomasz Myrta <jasiek@klaster.net>
To: Hannu Krosing <hannu@tm.ee>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Unions and where optimisation
Date: Wed, 8 Jan 2003 15:36:33 +0100
Message-ID: <200301081536.33211.boris.klug@control.de> (raw)
In-Reply-To: <3E1C366B.5080406@klaster.net>
References: <200301081425.48597.boris.klug@control.de>
<1042041735.3237.1.camel@huli>
<3E1C366B.5080406@klaster.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: boris.klug@control.de, jasiek@klaster.net, hannu@tm.ee
Subject: Re: Unions and where optimisation
In-Reply-To: <200301081536.33211.boris.klug@control.de>
References: <200301081425.48597.boris.klug@control.de> <1042041735.3237.1.camel@huli> <3E1C366B.5080406@klaster.net> <200301081536.33211.boris.klug@control.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox