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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-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

Browse pgsql-docs by date

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

Browse pgsql-patches by date

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