Script with stored procedure too slow

I have a little problem with the call of one stored procedure that is sometimes too slow inside of one scrip that is running every second in gateway event script area.
I need that the full script will be executed in less of one second, but when i need to call the store procedure it delay sometimes more of one second, when the call of the store procedure is not needed the scrip needs just 3ms to finish the cycle.
This stored procedure is just for store data in the database, so i don’t need to get back anything after the call.
The idea that i have is to call the stored procedure and jump to the next line in the code without wait to return anything. And keep this 3 ms of cycle.

is there any way to just call and automatically jump to the next line of code witout any wait after the system.db.execSProcCall(xxx)?

I have try to set true to the option skipAudit, but it doesn’t solve the problem.

system.db.createSProcCall(procedureName, database, tx, skipAudit)


String procedureName - The named of the stored procedure to call.

String database - The name of the database connection to execute against. If omitted or “”, the project’s default database connection will be used.

String tx - A transaction identifier. If omitted, the call will be executed in its own transaction.

boolean skipAudit - A flag which, if set to true, will cause the procedure call to skip the audit system. Useful for some queries that have fields which won’t fit into the audit log.


SProcCall - A stored procedure call context, which can be configured and then used as the argument to system.db.execSProcCall.



Hi Antonio,

Use the system.util.invokeAsynchrous() function.

Write a function that includes your call to system.db.createSProcCall and then call the function using system.util.invokeAsynchrous().

system.util.invokeAsynchrous() executes the function in another thread so it returns immediately in your script.


Thank you a lot! I will try it today and let you know the results