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

Re: [DOCS] Partition: use triggers instead of rules

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Michael Paesold" <mpaesold(at)gmx(dot)at>, "NikhilS" <nikkhils(at)gmail(dot)com>, "David Fetter" <david(at)fetter(dot)org>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, "PostgreSQL Docs" <pgsql-docs(at)postgresql(dot)org>, "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [DOCS] Partition: use triggers instead of rules
Date: 2007-11-29 17:29:51
Message-ID: 87ve7lj6y8.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-docspgsql-patches
"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:

> Heh, o.k. that was an ambiguous sentence. In a partitioned environment
> you are likely not moving millions of rows around. Thus the "rule"
> benefit is lost. You are instead performing many (sometimes
> lots-o-many) inserts and updates that involve a small number of rows.

I'm still not following at all. If you're partitioning it's because you have a
*lot* of data. It doesn't say anything about what you're doing with that data.
Partitioning is useful for managing large quantities of data for both OLTP and
DSS systems.

I tend to be happier recommending triggers over rules if only because rules
are just harder to understand. Arguably they don't really work properly for
this use anyways given what happens if you use volatile functions like
random() in your where clause.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's On-Demand Production Tuning

In response to

Responses

pgsql-docs by date

Next:From: Joshua D. DrakeDate: 2007-11-29 17:52:33
Subject: Re: [PATCHES] Partition: use triggers instead of rules
Previous:From: Andrew DunstanDate: 2007-11-29 17:19:42
Subject: Re: [PATCHES] Partition: use triggers instead of rules

pgsql-patches by date

Next:From: Joshua D. DrakeDate: 2007-11-29 17:52:33
Subject: Re: [PATCHES] Partition: use triggers instead of rules
Previous:From: Andrew DunstanDate: 2007-11-29 17:19:42
Subject: Re: [PATCHES] Partition: use triggers instead of rules

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