Re: delta relations in AFTER triggers
Kevin Grittner <kgrittn@gmail.com>
From: Kevin Grittner <kgrittn@gmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, David Fetter <david@fetter.org>, Kevin Grittner <kgrittn@ymail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Heikki Linnakangas <hlinnakangas@vmware.com>,
Amit Khandekar <amit.khandekar@enterprisedb.com>, Alvaro Herrera <alvherre@2ndquadrant.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2016-11-02T14:57:01Z
Lists: pgsql-hackers
Attachments
- ri-set-logic.sql (application/sql)
On Sun, Oct 30, 2016 at 10:35 AM, Kevin Grittner <kgrittn@gmail.com> wrote: > SPI support would also > allow us to consider using set logic for validating foreign keys, > instead of the one-row-at-a-time approach currently used. Just as a proof of concept for this I used the attached test case to create foreign keys using current techniques versus set-oriented queries with the transition-tsr code. These probably can be improved, since this is a "first cut" off the top of my head. The delete of about one million rows from a "parent" table with no matching rows in the "child" table, and no index on referencing column in the child table, took 24:17.969 using current triggers and 00:03.262 using the set-based triggers. Yes, that reduces current run time for that case by 99.78% -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Don't permit transition tables with TRUNCATE triggers.
- 29fd3d9da0ff 10.0 landed
-
Pass EXEC_FLAG_REWIND when initializing a tuplestore scan.
- 304007d9f1f6 10.0 landed
-
Faster expression evaluation and targetlist projection.
- b8d7f053c5c2 10.0 cited
-
Remove obsoleted code relating to targetlist SRF evaluation.
- ea15e18677fc 10.0 cited
-
Implement syntax for transition tables in AFTER triggers.
- 8c48375e5f43 10.0 cited