Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
3.0.7
Description
Hello
I'm migrating from mysql connector J to mariadb connector J.
I have some legacy projects using server side prepared statements.
I have read Marias' connector source code both 2.x and 3.x.
Maria's connector documentation states the following about useServerPrepStmts
The applications that repeatedly use the same queries have value to activate this option, but the general case is to use the direct command (text protocol)
|
My question is : why is the general case documented as set to use the direct command ?
AFAIU binary protocol is better because it has less overhead and execution benefits from a cached execution plan. There is also a safe upper limit of 8192 bytes (on the connector side when clientPrepStmts are used) so cached ones do not add much memory usage.
Of course preparing triggers a prepare & execute instead of a raw query. I'm not sure it may alter performances.
Or is the text protocol just "safer" or "better" ? Is it to avoid cache misshits ?
Thanks