Re: Rules and Views - Mailing list pgsql-hackers

From Curt Sampson
Subject Re: Rules and Views
Date
Msg-id Pine.NEB.4.44.0208011021240.539-100000@angelic.cynic.net
Whole thread Raw
In response to Re: Rules and Views  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Responses Re: Rules and Views  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 31 Jul 2002, Zeugswetter Andreas SB SD wrote:

> The utility is "Table Partitioning by expression".
>
> Basically you have a union view like:
> create view history as
> select * from history2000 where yearcol=2000
> union all
> select * from history2001 where yearcol=2001

You want to be careful with this sort of stuff, since the query planner
sometimes won't do the view as efficiently as it would do the fully
specified equivalant query. I've posted about this here before.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Open 7.3 items
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Trim the Fat (Was: Re: Open 7.3 items )