Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 735D22E0354; Thu, 29 Nov 2007 13:30:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 43703-02; Thu, 29 Nov 2007 13:29:48 -0400 (AST) Received: from oxford.xeocode.com (unknown [62.232.55.118]) by postgresql.org (Postfix) with ESMTP id 8FBFF2E0082; Thu, 29 Nov 2007 13:29:58 -0400 (AST) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1IxnCy-0001mG-6T; Thu, 29 Nov 2007 17:29:52 +0000 To: "Joshua D. Drake" Cc: "Tom Lane" , "Michael Paesold" , "NikhilS" , "David Fetter" , "Jonah H. Harris" , "PostgreSQL Docs" , "PostgreSQL Patches" Subject: Re: [DOCS] Partition: use triggers instead of rules In-Reply-To: <20071129091359.206fd8f2@commandprompt.com> (Joshua D. Drake's message of "Thu\, 29 Nov 2007 09\:13\:59 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX" 51097) References: <20071128202615.GG24146@fetter.org> <21686.1196283184@sss.pgh.pa.us> <36e682920711281858x9a37039sa104036bf025de41@mail.gmail.com> <20071129031702.GU24146@fetter.org> <2854.1196315753@sss.pgh.pa.us> <20071128224154.06f950c9@commandprompt.com> <474EDAE2.3010705@gmx.at> <474EE25E.3080304@commandprompt.com> <14455.1196353045@sss.pgh.pa.us> <474EE992.2050209@commandprompt.com> <87zlwxj7xu.fsf@oxford.xeocode.com> <20071129091359.206fd8f2@commandprompt.com> From: Gregory Stark Organization: EnterpriseDB Date: Thu, 29 Nov 2007 17:29:51 +0000 Message-ID: <87ve7lj6y8.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/297 X-Sequence-Number: 4538 "Joshua D. Drake" 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