Answer the question
In order to leave comments, you need to log in
How fast is PDO?
Started a new project and finally decided to move from mysql_ to PDO. After a day of working with him, I got the impression that he was very slow, I tested on simple queries like:
$selectUser = $pdo->query('SELECT * FROM admin');
$selectUser = $selectUser->fetch();
Answer the question
In order to leave comments, you need to log in
Here is a good article for beginners, read the comments, there are a lot of reviews and use cases people brought, the main idea is that pdo is initially object-oriented and has prepared statements. It is a) convenient b) safe. All other pipiskomeryalki in projects like "my second improved blog in php" do not make sense. For the gain in speed of development/security is more important today than microadvantages from change of the driver to a DB.
Of course, it is slower, this comes from the very principle of its work. But who is stopping you from implementing caching?
You can start with the fact that mysql_
the functions have been removed from php, as far as I understand, since version 5.5, and only mysqli_
analogues that are not faster than PDO remain. And the rest I think you have already learned from other answers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question