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

From Andrew Dunstan
Subject Re: [DOCS] Partition: use triggers instead of rules
Date
Msg-id 474EF4AE.8010405@dunslane.net
Whole thread Raw
In response to Re: [DOCS] Partition: use triggers instead of rules  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-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



pgsql-patches by date:

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