From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Priem <ap@cict.nl>
Cc: pgsql-performance@postgresql.org
Subject: Re: 'View'-performance
Date: Thu, 14 Aug 2003 08:00:49 -0400
Message-ID: <15713.1060862449@sss.pgh.pa.us> (raw)
In-Reply-To: <00e801c36259$30b908b0$b696a8c0@APR>
References: <002a01c34f62$75c01de0$b696a8c0@APR>
<00e801c36259$30b908b0$b696a8c0@APR>
"Alexander Priem" <ap@cict.nl> writes:
> What I am thinking about is creating two views for this table: Table_View a=
> nd Table_History. Table_View would contain all records where "Deleted is nu=
> ll". Table_History would just contain all records (Select * From Table).
> Would " Select * from Table_View Where Name=3D'xxx' " perform worse than " =
> Select * from Table Where deleted is null and Name=3D'xxx' " ?
They'd be exactly the same (modulo a few extra microseconds/milliseconds
for the query planner to expand the view definition).
regards, tom lane
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: tgl@sss.pgh.pa.us, ap@cict.nl
Subject: Re: 'View'-performance
In-Reply-To: <15713.1060862449@sss.pgh.pa.us>
References: <002a01c34f62$75c01de0$b696a8c0@APR> <00e801c36259$30b908b0$b696a8c0@APR> <15713.1060862449@sss.pgh.pa.us>
* 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