When not to use language commands

For better performance, you can code applications that always execute the same query to invoke stored procedures instead. Instead of coding the query in the C application code, you can create a stored procedure to execute the query and use an RPC command to invoke the stored procedure. This method can be faster because the server does not need to parse and interpret the query each time it executes.

Stored procedures can be considerably faster when a single invocation of the procedure replaces several client commands.

Stored procedures can be executed either by an execute language command or by an RPC command. See “RPCs versus execute language commands” for a discussion of the differences between these methods.