When I'm testing my query triggers, I see that the query execution time increase when I'm putting a lot of "RAISE NOTICE ... " in the trigger code. Does this time increase also when I'm calling this queries in my softwares without displaying output in the messages windows or it's only when the messages output is attached?
Based on my own experience with plpgSQL, I would say yes. And according to the authors of the book PostgreSQL Server Programming - Second Edition (by Usama Dar, Hannu Krosing, Jim Mlodgenski, Kirk Roybal):
[...] The
RAISE
statements need to be written, commented out, and restored when needed.[...] They also slow down the execution of the routine.[...]
p.134
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With