-3

I read many threads in stackoverflow and also googled but i still have one confusion

Please Tell me which will be better for me if i will have following

Database : MYSQL

  1. 10 000 Records in about 10 tables
  2. 100 tables
  3. 100 requests per second

i want to make website in which above details can be occur in future

if there are 100 users are viewing my site concurrently which will be best PDO or mysqli

6
  • 3
    I would think there will hardly be any difference. Maybe mysqli will be slightly faster. Why don't you benchmark it?
    – deceze
    Jun 21, 2012 at 10:38
  • 1
    you should be more worried about your table storage engine rather than how you are accessing the DB. stackoverflow.com/questions/20148/myisam-versus-innodb
    – Paul Bain
    Jun 21, 2012 at 10:39
  • @PaulBain link you gave does not give my answer Jun 21, 2012 at 10:41
  • @PaulBain my confusion is between pdo and mysqli Jun 21, 2012 at 10:42
  • What are you confused about?!
    – deceze
    Jun 21, 2012 at 10:47

2 Answers 2

5

The Choosing an API chapter in the PHP manual says this:

The overall performance of all three extensions is considered to be about the same. Although the performance of the extension contributes only a fraction of the total run time of a PHP web request. Often, the impact is as low as 0.1%.

To sum up: if performance is your only concern, it's irrelevant which one you choose. (Not to mention that database size or complexity is basically MySQL Server's problem.)

1

In my opinion PDO is better than mysqli and there are no doubts. There are support for another databases, named parameters, easier SQL-Injection security (using prepared statements).

Mysqli is slightly faster, but i think it cannot be main reason in this case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.