Using Prepared Statements
For SingleStoreDB, use the endpoint (available in the Cloud Portal) to run the commands discussed in this topic.
MemSQL version 6.
Feature 'Audit logging with binary protocol' is not supported by SingleStoreDB.
If you are using an older version of SingleStoreDB, or using SingleStoreDB with Audit Logging enabled, server-side prepared statements are not supported.
In the MySQL Connector/J (JDBC) driver, set
useServerPrepStmts=false, which is the default configuration https://dev.
mysql. com/doc/connector-j/5. 1/en/connector-j-reference-configuration-properties. html.
In MariaDB Connector/J, set
In the Go MySQL driver, set
In PHP PDO, set
EMULATE_ PREPARES=TRUE php. net/manual/en/pdo. setattribute. php.
In many other databases, server-side prepared statements provide performance advantages, but SingleStoreDB already compiles and caches query plans internally, so SingleStoreDB does not need server-side prepared statements to get most of those performance advantages.
Last modified: July 4, 2023