# PDO performance

- Thread: https://externals.io/message/33148
- Original archive: https://news-web.php.net/php.internals/33148
- Started by Andrew Mason on 2007-11-15T06:33:02+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #33148 — Andrew Mason — 2007-11-15T06:33:02+00:00

URL: https://externals.io/message/33148#33148

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

---

## #33149 — Alexey Zakhlestin — 2007-11-15T06:47:59+00:00

URL: https://externals.io/message/33148#33149 · In reply to: #33148

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 :)


> 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
http://blog.milkfarmsoft.com/

---

## #33154 — Brian Moon — 2007-11-15T14:02:48+00:00

URL: https://externals.io/message/33148#33154 · In reply to: #33148

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 =)
