Using Prepared Statements

Note

For SingleStoreDB Cloud, use the endpoint (available in the Cloud Portal) to run the commands discussed in this topic.

If you are using an older version of SingleStoreDB Cloud, or using SingleStoreDB Cloud with Audit Logging enabled, server-side prepared statements are not supported. Instead, many client drivers support a configuration option to allow client-side prepared statements. This configuration option may also be referred to as client-side prepared statement emulation or parameter interpolation. You can use the same code in your application, but just change a flag in the client driver configuration. For example:

In many other databases, server-side prepared statements provide performance advantages, but SingleStoreDB Cloud already compiles and caches query plans internally, so SingleStoreDB Cloud does not need server-side prepared statements to get most of those performance advantages.

Last modified: July 4, 2023

Was this article helpful?