I have recently learned about PDO and and Doctrine 2.2.2 to build an application. but i'will work with some critical constraints in my environment( a lot of data , connexion speed ...etc) i know that Doctrine have a PDO layer,so maybe PDO is faster but i want to work with a Real ORM Framework like Hibernate.
after reading this post Benchmark PDO vs Doctrine
I have to know if Doctrine is [ very ] slow than PDO.
Thank you
Doctrine 2 + PHP 5.3+ improved greatly the speed of Doctrine.
However, you will never be close to PDO beacause it is not the same thing : do you want to query your database or do you want to automatically map your database to PHP Objects and then use objects in your code ?
Using a PHP cache like APC will improve Doctrine's performance a lot. From what I've seen; somewhere between 3-7 times.
If you can't use a cache, you could easily switch to Doctrine's DBAL layer instead of the ORM in areas where you really need all the speed you can get. Runtime speeds will then be a lot closer to PDO, but you will lose the convenience of an ORM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With