If no connection is initially made, then the statement handler will never be called because we won't enable the compiler option that enables it. But if we use on-demand debugging or if we initially connect but then not actively use the debugger this statement handler function will be called. We need to make sure that it is as optimised as possible, specially in the case where we set statement_handler_enabled to false, so that the performance hit of calling this function is as low as possible
If no connection is initially made, then the statement handler will never be called because we won't enable the compiler option that enables it. But if we use on-demand debugging or if we initially connect but then not actively use the debugger this statement handler function will be called. We need to make sure that it is as optimised as possible, specially in the case where we set
statement_handler_enabledto false, so that the performance hit of calling this function is as low as possible