I want to speed up some queries using prepared statements on a high traffic site. what I don’t think I understand correctly is the advantage of using prepared statements if they cannot remain ready for multiple connections. this seems to be impossible with PDO, which also does not allow persistent connections. but persistent join functions do not allow PDO.
allows you to talk for arguments, I run the query 5,000 times per second: SELECT * FROM some_table WHERE some_column LIKE 'some_value'
from what I understand, PDO will prevent mysql from recompiling and query evaluation if I change "some_value" every time I need to query. I also understand that "some_value" can be passed in binary instead of ASCII to save bandwidth, but it will not save much if I had to send the whole request every time I open the connection.
also from what I read, stored procedures are not a solution because they do not remain compiled over multiple connections.
is there any solution to this problem? keeping the finished statement on the server somewhere and keeping it compiled in memory and ready to fire as soon as it receives the variables?
, PDO? ( , , )