We know that single quotes in PHP is faster than double quotes so $foo = 'lorem ipsum';
is faster than $foo = "lorem ipsum";
.
But what about in Mysql query? Does single quotes or double quotes affect the execution speed?
Consider the following different syntaxes. Which one is the fastest one? Or is there yet another syntax which is even faster?
mysqli_query($conn, 'SELECT * FROM `mytable` WHERE `full_name` = "' . $full_name. '"');
mysqli_query($conn, "SELECT * FROM `mytable` WHERE `full_name` = '" . $full_name. "'");
mysqli_query($conn, "SELECT * FROM `mytable` WHERE `full_name` = '$full_name'");
mysqli_query($conn, "SELECT * FROM `mytable` WHERE `full_name` = '{$full_name}'");
== Edit ==
I understand that the structure of database and other factors can also affect the execution speed. But let's assume that we already have a well-structured database and exclude other factors.