pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Klint Gore <kg@kgb.une.edu.au>
To: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: horizontal partition
Date: Thu, 03 Feb 2005 14:31:35 +1100
Message-ID: <42019B1735F.1271KG@129.180.47.120> (raw)
In-Reply-To: <ctrtln$d0m$1@floppy.pyrenet.fr>
References: <200502021209.06878.josh@agliodbs.com>
	<ctrtln$d0m$1@floppy.pyrenet.fr>

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             :                 :
+---------------------------------------+-----------------+



view thread (9+ messages)  latest in thread

Message-ID: <42019B1735F.1271KG@129.180.47.120>
Permalink:  ../42019B1735F.1271KG@129.180.47.120/
Also on:    postgresql.org/message-id/42019B1735F.1271KG@129.180.47.120

 · 

reply

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: kg@kgb.une.edu.au, mendola@bigfoot.com
  Subject: Re: horizontal partition
  In-Reply-To: <42019B1735F.1271KG@129.180.47.120>

* 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