Inspired by Antony, Andrey has implemented a memory optimization for the PHP mysqlnd library. Depending on your usage pattern and the actual query, memory used for result sets is less and free’d earlier to be reused by the PHP engine. In other cases, the optimization will consume about the same or even more memory. The additional choice is currently available with mysqli only.
From the network line into your script
Many wheels start spinning when mysqli_query() is called. All the PHP MySQL
APIs/extensions (mysqli, PDO_MySQL, mysql) use a client library
that handles the networking details and provides a C API to the C
extensions. Any recent PHP will default to use the mysqlnd
library. The library speaks the MySQL Client Server …