You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this feature request is part of a serie to improve performance when using MariaDB : see doc
MariaDB (since 10.2) permit sending COM_STMT_PREPARE + COM_STMT_EXECUTE directly, without having to wait for prepare, this permit faster first execution. It wpuld be great to have that !
Connectors usually follow a two-step process for prepared statements:
Prepare: Send a COM_STMT_PREPARE command to the server, receiving a statement ID in response.
Execute: Send a COM_STMT_EXECUTE command, using the statement ID obtained in the previous step.
When the server support MARIADB_CLIENT_STMT_BULK_OPERATIONS capability (since MariaDB 10.2), a specific statement ID value of -1 (or 0xffffffff in hexadecimal) can be used to indicate that the previously prepared statement could be reused. This enables connectors to pipeline the preparation and execution steps into a single request:
Send a COM_STMT_PREPARE then a COM_STMT_EXECUTE with statement ID -1 (0xffffffff) commands to the server.
Read the prepare and execute responses
If the COM_STMT_PREPARE command returns an error (ERR_Packet), the subsequent COM_STMT_EXECUTE with statement ID -1 will also fail and return an error.
By eliminating the round trip for the separate COM_STMT_EXECUTE command, this approach improves performance for the first execution.
Traditionally, connectors send COM_STMT_PREPARE, wait for results, then execute COM_STMT_EXECUTE with statement_id received from the prepare result.
this feature request is part of a serie to improve performance when using MariaDB : see doc
MariaDB (since 10.2) permit sending COM_STMT_PREPARE + COM_STMT_EXECUTE directly, without having to wait for prepare, this permit faster first execution. It wpuld be great to have that !
from https://mariadb.com/kb/en/mariadb-protocol-differences-with-mysql/#pipelining-prepare-execute
The text was updated successfully, but these errors were encountered: