Re: horizontal partition - Mailing list pgsql-performance

From Klint Gore
Subject Re: horizontal partition
Date
Msg-id 42019B1735F.1271KG@129.180.47.120
Whole thread Raw
In response to Re: horizontal partition  (Gaetano Mendola <mendola@bigfoot.com>)
Responses Re: horizontal partition  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
On Thu, 03 Feb 2005 02:10:15 +0100, Gaetano Mendola <mendola@bigfoot.com> wrote:
> why the index usage is lost if used in that way ?

This is how I interpret it (if anyone wants to set me straight or
improve on it feel free)

Views are implemented as rules.

Rules are pretty much just a macro to the query builder.  When it sees
the view, it replaces it with the implementation of the view.

When you join a view to a table, it generates a subselect of the
implementation and joins that to the other table.

So the subselect will generate the entire set of data from the view
before it can use the join to eliminate rows.

I would like a way to make this work better as well.  One of my views is
32 joins of the same table (to get tree like data for reports).

klint.

+---------------------------------------+-----------------+
: Klint Gore                            : "Non rhyming    :
: EMail   : kg@kgb.une.edu.au           :  slang - the    :
: Snail   : A.B.R.I.                    :  possibilities  :
: Mail      University of New England   :  are useless"   :
:           Armidale NSW 2351 Australia :     L.J.J.      :
: Fax     : +61 2 6772 5376             :                 :
+---------------------------------------+-----------------+

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: horizontal partition
Next
From: Christopher Browne
Date:
Subject: Re: High end server and storage for a PostgreSQL OLTP system