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

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

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
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: [PATCHES] Partition: use triggers instead of rules
Date: 2007-11-29 17:19:42
Message-ID: 474EF4AE.8010405@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-docspgsql-patches

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



In response to

pgsql-docs by date

Next:From: Gregory StarkDate: 2007-11-29 17:29:51
Subject: Re: [DOCS] Partition: use triggers instead of rules
Previous:From: Joshua D. DrakeDate: 2007-11-29 17:13:59
Subject: Re: Partition: use triggers instead of rules

pgsql-patches by date

Next:From: Gregory StarkDate: 2007-11-29 17:29:51
Subject: Re: [DOCS] Partition: use triggers instead of rules
Previous:From: Joshua D. DrakeDate: 2007-11-29 17:13:59
Subject: Re: Partition: use triggers instead of rules

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