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?
Does RAISE NOTICE 'text' in triggers slow down queries in Postgresql?
Asked Answered
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
© 2022 - 2024 — McMap. All rights reserved.