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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> Rules are extremely slow in comparisons and not anywhere near as 
> flexible. As I said up post yesterday... they work well in the basic 
> partitioning configuration but anything else they are extremely deficient.

I think that the above claim is exceedingly narrow-minded.  A trigger
will probably beat a rule for inserts/updates involving a small number
of rows.  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.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group