Yes, because when you call PDO::prepare , the server must create a query plan and meta-information for this request, then there is additional overhead for binding the specified parameters when using PDO::execute . Thus, to save this overhead and improve performance, you can use PDO::query for queries without parameters.
However, depending on the scale and size of your application and the configuration of your server / host (public / private), you may or may not see any performance increase whatsoever.
nickb
source share