pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Joshua D. Drake <jd@commandprompt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paesold <mpaesold@gmx.at>
Cc: NikhilS <nikkhils@gmail.com>
Cc: David Fetter <david@fetter.org>
Cc: Jonah H. Harris <jonah.harris@gmail.com>
Cc: PostgreSQL Docs <pgsql-docs@postgresql.org>
Cc: PostgreSQL Patches <pgsql-patches@postgresql.org>
Subject: Re: [PATCHES] Partition: use triggers instead of rules
Date: Thu, 29 Nov 2007 12:19:42 -0500
Message-ID: <474EF4AE.8010405@dunslane.net> (raw)
In-Reply-To: <474EE992.2050209@commandprompt.com>
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>
	<d3c4af540711290705q35ea51cdkfaa94b0c07a1aecc@mail.gmail.com>
	<474EDAE2.3010705@gmx.at>
	<474EE25E.3080304@commandprompt.com>
	<14455.1196353045@sss.pgh.pa.us>
	<474EE992.2050209@commandprompt.com>



Joshua D. Drake wrote:
>
>>  A trigger
>> will probably beat a rule for inserts/updates involving a small number
>> of rows. 
>
> Which is exactly what partitioning is doing.
>
>  For large numbers of rows, like an INSERT/SELECT from another
>> large table, the rule is likely to win, because its overhead is paid
>> once per query not once per row.  Also, if you implement the trigger
>> with an EXECUTE (forcing a planning cycle) intead of hard-coded
>> commands, the speed advantage becomes even more dubious.
>
> Not for partitioning. Although I agree with your sentiments for normal 
> operation.
>
>

Joshua, you're not making much sense here.

Tom is talking about partitioning and his analysis is correct *in the 
partitioning case* AFAICS.

What basis do you have for saying he is not?

cheers

andrew





view thread (38+ messages)  latest in thread

Message-ID: <474EF4AE.8010405@dunslane.net>
Permalink:  ../474EF4AE.8010405@dunslane.net/
Also on:    postgresql.org/message-id/474EF4AE.8010405@dunslane.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: andrew@dunslane.net, jd@commandprompt.com, tgl@sss.pgh.pa.us, mpaesold@gmx.at, nikkhils@gmail.com, david@fetter.org, jonah.harris@gmail.com, pgsql-patches@postgresql.org
  Subject: Re: [PATCHES] Partition: use triggers instead of rules
  In-Reply-To: <474EF4AE.8010405@dunslane.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox