January 2019
Intermediate to advanced
286 pages
7h 41m
English
It is recommended to use prepared statements for all those queries that are frequently used for better performance. For example, as we discussed in earlier sections, for a login call, the read query is the same for any number of users, so even though caching increases the performance of turn-around latency, this prepared statement will enhance it further, because the payload size is smaller when the client is making that call to the MySQL database, thus reducing the network packet size indirectly, therefore enhancing performance and reducing latency.
The syntax of the prepared statement is as follows:
PREPARE <name of prepared statement> FROM '<SQL statement to be prepared>';
The following diagram ...