Re: [DOCS] Partition: use triggers instead of rules - Mailing list pgsql-patches

From Gregory Stark
Subject Re: [DOCS] Partition: use triggers instead of rules
Date
Msg-id 87ve7lj6y8.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: [DOCS] Partition: use triggers instead of rules  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: [DOCS] Partition: use triggers instead of rules
List pgsql-patches
"Joshua D. Drake" <jd@commandprompt.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

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [DOCS] Partition: use triggers instead of rules
Next
From: "Joshua D. Drake"
Date:
Subject: Re: [DOCS] Partition: use triggers instead of rules