Re: SELECT triggers - Table Partitioning

From: Yogesh Sharma <ysharma(at)catprosystems(dot)com>
To: Majid Azimi <majid(dot)merkava(at)gmail(dot)com>
Cc: PostgreSQL - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: SELECT triggers - Table Partitioning
Date: 2010-11-02 05:09:24
Message-ID: 4CCF9D04.1030600@catprosystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 11/01/2010 02:33 PM, Majid Azimi wrote:
> Hi guys.
>
> In the documentation for triggers there is a sentence that says "you
> can't create select triggers". could someone explain why?
> When we use Table Partitioning how can we redirect SELECT queries to
> specific tables. If we don't have SELECT triggers then it will
> search all tables inherited from main table thus there is no
> performance optimization in SELECT queries.
> Is there any solution?
>
Way partition works is that you add a constraint on table and insert
data directly or via a trigger redirect it inherited tables.

When you query you use proper where clause so that if will hit
minimum tables based on "constraint" that was added earlier. This is
done via constraint exclusion.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Thom Brown 2010-11-02 09:13:49 Re: How to mark a transaction as SERIALIZABLE?
Previous Message Joe Carr 2010-11-02 01:51:05 How to mark a transaction as SERIALIZABLE?