Skip site navigation (1) Skip section navigation (2)

Partitioned tables and views

From: "Mike Gould" <mgould(at)allcoast(dot)net>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Partitioned tables and views
Date: 2008-07-31 16:54:46
Message-ID: 20080731165446.3a41ac86@mail.allcoast.net (view raw or flat)
Thread:
Lists: pgsql-general
I have several tables that we have partitioned by physical location.  This seems to give us the best overall performance when doing location specific queries.  I have a few questions.

1. Is the planner/optimizer intelligent enough to know when we are not doing a query based on location?  For example we might have a trailer that is used by multiple locations and we need to know all of the locations where that trailer has been used.  Other queries might look for a specific work order that could only be in one of the partitions.

2.  How are views handled with partitioned tables?  I don't find anything in the documentation that tells me how views are handled.  Depending on the view will it only use the partitioned table or will it use the master table?

Best Regards

Michael Gould

Responses

pgsql-general by date

Next:From: David R RobisonDate: 2008-07-31 16:56:40
Subject: Re: Doing an LDAP lookup from a SQL SELECT
Previous:From: Tom LaneDate: 2008-07-31 16:50:50
Subject: Re: Cursor Error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group