Re: Tablespaces - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: Tablespaces
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184D0FB@m0114.s-mxs.net
Whole thread Raw
In response to Tablespaces  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: Tablespaces  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
> > With the rule system and two underlying tables one could make it work by
> > hand I think.
>
> The rule system could be used to do this, but there was some discussion of
> using inherited tables to handle it. However neither handles the really hard
> part of detecting queries that use only a part of the table and taking that
> into account in generating the plan.

I think the consensus should be to add smarts to the planner to include
static constraint information to reduce table access.

e.g if you have a constraint "acol integer, check acol < 5"
and you have a query with a "where acol = 10" you could reduce that
to "where false". This would help in all sorts of situations not only
partitioned/inherited tables. I am not sure what the runtime cost of
such an inclusion would be, so maybe it needs smarts to only try in certain
cases ?

Andreas


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: [pgsql-hackers-win32] Tablespaces
Next
From: Dave Cramer
Date:
Subject: Re: Postgresql JDBC-Driver