You can always turn off global logging by setting global_logging to N. However, if you want to shave every millisecond from your stored procedure’s execution time, comment out all CALL DB2. statements when you are sure that your SQL-PL or external stored procedures are ready for the prime time. I use a simple sed script to put the comments and use them later on if need be.

How to turn off logging globally

db2 "call db2.update_sp_config('global_logging','y')"

How to comment out the CALL DB2. statements in your SQL-PL stored procedures

# Comment Logger Calls		
cat actsp.sql | sed 's/CALL DB2./--CALL DB2./' > sp.sql
db2 -td@ -f sp.sql 
# Uncomment Logger Calls		
cat sp.sql | sed 's/--CALL DB2./CALL DB2./' > actsp.sql
db2 -td@ -f actsp.sql