Using Prepared Statements
Note
For SingleStore Helios, use the endpoint (available in the Cloud Portal) to run the commands discussed in this topic.
If you are using an older version of SingleStore Helios, or using SingleStore Helios 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
useServerPrepStmts=false
https://mariadb.com/kb/en/about-mariadb-connector-j/. -
In ODBC, set
no_
https://dev.ssps=1 mysql. com/doc/connector-odbc/en/connector-odbc-configuration-connection-parameters. html. -
In the Go MySQL driver, set
interpolateParams=true
https://github.com/go-sql-driver/mysql#interpolateparams. -
In PHP PDO, set
PDO::ATTR_
https://www.EMULATE_ PREPARES=TRUE php. net/manual/en/pdo. setattribute. php.
In many other databases, server-side prepared statements provide performance advantages, but SingleStore Helios already compiles and caches query plans internally, so SingleStore Helios does not need server-side prepared statements to get most of those performance advantages.
Last modified: February 26, 2024