Re: Linear slow-down while inserting into a table with an ON INSERT trigger ?

2021-07-17 Thread Tom Lane
David Rowley writes: > On Sat, 17 Jul 2021 at 16:40, Justin Pryzby wrote: >> You could run a single UPDATE rather than 30k triggers. >> Or switch to an INSERT on the table, with an index on it, and call >> max(last_parent_table_change) from whatever needs to ingest it. And prune >> the >> old e

Re: Linear slow-down while inserting into a table with an ON INSERT trigger ?

2021-07-17 Thread David Rowley
On Sat, 17 Jul 2021 at 16:40, Justin Pryzby wrote: > You could run a single UPDATE rather than 30k triggers. > Or switch to an INSERT on the table, with an index on it, and call > max(last_parent_table_change) from whatever needs to ingest it. And prune the > old entries and vacuum it outside the