From: Mike Mascari <mascarm@mascari.com>
To: Mike Mascari <mascarm@mascari.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow execution time when querying view with WHERE clause
Date: Mon, 22 Nov 2004 16:46:08 -0500
Message-ID: <41A25E20.2050503@mascari.com> (raw)
In-Reply-To: <41A25C3B.3040608@mascari.com>
References: <41A25C3B.3040608@mascari.com>
Mike Mascari wrote:
> I have the following view:
>
> create or replace view market.p_areas as
> select a.*
> from _areas a
> where a.area in (
> select b.area
> from _bins b, _inventories i, _offers o, _pricemembers p
> where b.bin = i.bin and
> i.inventory = o.inventory and
> o.pricegroup = p.pricegroup and
> p.buyer in (
> select s.store
> from _stores s, _webusers w
> where w.webuser = getWebuser() and
> w.company = s.company
> union
> select s.store
> from _stores s, _companies c
> where s.company = c.company and
> c.companyid = 'DEFAULT'
> )
> );
...
I failed to report the version:
select version();
PostgreSQL 7.4.5 on i686-pc-linux-gnu, compiled by GCC
i686-pc-linux-gnu-gcc (GCC) 3.4.0 20040204 (prerelease)
Sorry.
Mike Mascari
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mascarm@mascari.com
Subject: Re: Slow execution time when querying view with WHERE clause
In-Reply-To: <41A25E20.2050503@mascari.com>
* 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