-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

Chetan Patel
  • 183
  • 2
  • 10

2 Answers2

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

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
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.

Kasyx
  • 3,170
  • 21
  • 32