Analysis of mysql, mysqli, PDO, MYSQL, MYSQLI performance which is better? Here we will make a simple comparison. Normal mysql connections will certainly be discarded because every time SQL injection is prevented, it is relatively slow. Mysqli is an optimization based on normal mysql. To be honest, it is very successful. The pre-processing method completely solves the problem of SQL injection. However, the only disadvantage is that only mysql databases are supported. Of course, if you do not operate other databases, this is undoubtedly the best choice. PDO is the latest one. The connection method is compatible with most databases and also solves SQL injection. But it also has some disadvantages. It only supports php5 and later versions (but I heard that php6 will only support this connection in the future ). PDO unifies all database abstraction layer object interfaces, and mysql only unifies mysql. To put it simply, PDO can perform operations on different databases using the same Code. For example, if you migrate data from mysql to mssql, the program does not need to be modified. Mysqli simply understands that mysql is not encapsulated. When a persistent connection is enabled for a PDO instance under high load, a relatively stable load value is obtained ". However, the efficiency is not the highest. Mysql is the fastest. Mysqli followed. It's just that when mysql and mysqli are in high concurrency and high system load, their load is also considerable. PDO does not.