Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/04/2010, 23:58
Avatar de neodani
neodani
 
Fecha de Ingreso: marzo-2007
Mensajes: 1.811
Antigüedad: 17 años, 1 mes
Puntos: 20
Respuesta: PDO o mysqli (pros y contras)

Cita:
Iniciado por GatorV Ver Mensaje
Si bien MySQLi es más rápido que PDO_MySQL, creo todo esto se resuelve ahora con la introducción de MySQLND, ya que en el backend puedes ocupar por usar ese driver y el rendimiento es casi el mismo.

Saludos.
Quieres decir que ahora en la nueva version de PHP 5.3 han cambiado el driver de mysql, por uno llamado mysqlnd que tiene mejor rendimiento?

He estado investigando

Algunas de las ventajas de usar mysqlnd incluyen:

* Fácil de compilar: no se linkea con libmysql y no tiene dependencias con MySQL.
* Conexiones persistentes para mysqli.
* Usa la administración de memoria de PHP y soporta el límite de memoria.
* Bajo consumo de memoria, mantiene cada registro en memoria sólo una vez; libmysql lo mantiene dos veces.
* Lleva una larga lista de estadísticas sobre la performance y análisis de cuellos de botella.

Fuente: http://www.vivaphp.com.ar/soft/mysqlnd


Features and Limitations

The current release covers the functionality of the libmysql beside some functions that are marked as experimental in the PHP documentation.

The MySQL native driver for PHP does not support the MySQL Server 4.0 or earlier. The MySQL Server 4.0 is no longer supported by MySQL as of 2008-12-31, see also MySQL Lifecycle Policy.

From the API additions discussed with Community members in November 2006 during the Frankfurt PHP conference, we managed to implement:

* improved persistent connections
* mysqli_fetch_all()
* performance statistics call: mysqli_get_cache_stats(), mysqli_get_client_stats(), mysqli_get_connection_stats()

More additions will follow.

Fuente: http://dev.mysql.com/downloads/connector/php-mysqlnd/

Sin embargo, no me queda claro como utilizarlo desde PDO


Q: Does PDO/MySQL support it?

Yes, the MySQL driver for PDO supports mysqlnd.
Fuente: http://dev.mysql.com/downloads/connector/php-mysqlnd/

Q: Will PDO/MySQL support it?

It is up to the PHP community to decide if and when PDO/MySQL will support it. Our development focus is currently on finishing the implementation and giving an example how to use it with ext/mysqli.

Fuente: http://ftp.ku.ac.th/pub/mirror/mysql...lnd/index.html

Muchas gracias de antemano!