Search Postgresql Archives

Re: Rule vs Trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
"Albe Laurenz" <all@xxxxxxxxxxxxxxxxx> writes:
Richard Broersma Jr wrote:

A rule would only
execute one additional statement. So if you can do it with a rule
conveniently, the rule will probably be faster.

I find this unlikely.  The overhead involved in setting up a rule
is probably larger than that involved in calling a trigger.
The real question is whether you need access to the modified data
or not --- a statement-level trigger doesn't currently get that.

Not that Tom ever needs any backing up, but when we started testing partitioning, we first tested with rules and then tested with triggers. Triggers are quite a bit faster than rules.

Joshua D. Drake



			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/



--

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux