MySQL prepared statements vs simple queries performance -
I did some tests, first with my statement ready with mysql, $ pdo-> test ()
and $ insert_sth-> Executed for 10k inserts ()
(if this is the case with the nominated parameter), and it took 301 time.
After that I created a simple insert query and every 10k for inserting, and it took 303 seconds
then I would like to know: whether the ready statements actually Do performance benefits? Because my tests have not shown it, or do I have to customize the version of my prepared statements so that they can be fast?
I can give my source code if needed.
INSERT
s is likely to be binding, because they are generally But these are not very complicated in terms of SQL - just a column and data list for putting them in. In this way, the query that you use to use is not as important as the amount of data that you fill in the database, how fast you can get data on the DB server, and how fast DB The server can store it.
Comments
Post a Comment