pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Horrible trigger performance after upgrade 8.0.12 -> 8.2.3 2+ messages / 2 participants [nested] [flat]
* Horrible trigger performance after upgrade 8.0.12 -> 8.2.3 @ 2007-03-20 19:26 Joseph S <jks@selectacast.net> 2007-03-20 19:58 ` Re: Horrible trigger performance after upgrade 8.0.12 -> 8.2.3 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Joseph S @ 2007-03-20 19:26 UTC (permalink / raw) To: pgsql-performance After upgrading to 8.2.3 INSERTs and UPDATEs on one of my tables became incredibly slow. I traced the problem to one of my triggers that calls one of my defined functions (that is IMMUTABLE). If I inline the function instead of calling it the runtime for my test update drops from 10261.234 ms to 564.094 ms. The time running the trigger itself dropped from 9749.910 to 99.504. BTW does make any sense to bother marking trigger functions as STABLE or IMMUTABLE? ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Horrible trigger performance after upgrade 8.0.12 -> 8.2.3 2007-03-20 19:26 Horrible trigger performance after upgrade 8.0.12 -> 8.2.3 Joseph S <jks@selectacast.net> @ 2007-03-20 19:58 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2007-03-20 19:58 UTC (permalink / raw) To: Joseph S <jks@selectacast.net>; +Cc: pgsql-performance Joseph S <jks@selectacast.net> writes: > After upgrading to 8.2.3 INSERTs and UPDATEs on one of my tables became > incredibly slow. I traced the problem to one of my triggers that calls > one of my defined functions (that is IMMUTABLE). If I inline the > function instead of calling it the runtime for my test update drops from > 10261.234 ms to 564.094 ms. The time running the trigger itself > dropped from 9749.910 to 99.504. With no more details than that, I don't see how you expect any useful comments. Let's see the code. Also, what PG version are you comparing to? > BTW does make any sense to bother marking trigger functions as STABLE or > IMMUTABLE? No, the trigger mechanisms don't pay any attention to that. I can hardly conceive of a useful trigger that wouldn't be VOLATILE anyway, since side effects are more or less the point. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-03-20 19:58 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2007-03-20 19:26 Horrible trigger performance after upgrade 8.0.12 -> 8.2.3 Joseph S <jks@selectacast.net> 2007-03-20 19:58 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox