PDO performance

php.internals

Andy Mason

18 years ago
Hi guys, Just a quick question. I've recently been looking at changing over our code to use the PDO interface to a mysql database. Currently we are using MySQLi but after looking at the PDO interface i personally prefer the way API is presented (not saying mysqli is bad or anything like that...completely personal). I was just wondering if there was any performance or latency hit by using PDO with mysql 5. From what i have benchmarked there isn't any at all, but since PDO came back faster for a few things i'm not sure how accurate my benchmarks were =) Just looking for some feedback. many thanks Andrew

Alexey Zakhlestin

18 years ago
If there is any difference, it is very small. And, anyway, overhead would turn to nothing comparing to typical query-execution time I've chosen PDO 3 years ago and never really looked at mysqli since then. PDO is a pleasure to work with :) On 11/15/07, Andrew Mason <slackmase2@gmail.com> wrote:
> Hi guys, > Just a quick question. I've recently been looking at changing over > our code to use the PDO interface to a mysql database. > > Currently we are using MySQLi but after looking at the PDO interface i > personally prefer the way API is presented (not saying mysqli is bad > or anything like that...completely personal). I was just wondering if > there was any performance or latency hit by using PDO with mysql 5. > > From what i have benchmarked there isn't any at all, but since PDO > came back faster for a few things i'm not sure how accurate my > benchmarks were =) > > Just looking for some feedback. > > many thanks > Andrew > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
-- Alexey Zakhlestin http://blog.milkfarmsoft.com/

Brian Moon

18 years ago
Andrew Mason wrote:
> Hi guys, > Just a quick question. I've recently been looking at changing over > our code to use the PDO interface to a mysql database. > > Currently we are using MySQLi but after looking at the PDO interface i > personally prefer the way API is presented (not saying mysqli is bad > or anything like that...completely personal). I was just wondering if > there was any performance or latency hit by using PDO with mysql 5. > > From what i have benchmarked there isn't any at all, but since PDO > came back faster for a few things i'm not sure how accurate my > benchmarks were =) > > Just looking for some feedback. > > many thanks > Andrew >
I have not done the benchmark recently, but here is what I found last year. It just depends on what is important to you. http://dealnews.com/developers/php-mysql.html
-- Brian Moon Senior Developer ------------------------------ http://dealnews.com/ It's good to be cheap =)