#50571 [Opn->Fbk]: Performance Mysqli in php 5.3.1 signific slower than 5.2.6
ID: 50571
Updated by: jani@php.net
Reported By: millennium at qme dot nl
-Status: Open
+Status: Feedback
Bug Type: MySQLi related
Operating System: Windows Server 2003
PHP Version: 5.3.1
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-12-24 23:01:39] millennium at qme dot nl
Description:
------------
The performance of Mysqli in php5.3.1(mysqlnd) is signific slower than
the performance in php 5.2.6. (I know it's not the best code, but it's
in production, and I would expect 5.3.1 is as fast as 5.2.6 or faster.
Reproduce code:
---------------
<?php
$SERVER = "127.0.0.1";
$USERNAME = "";
$PASSWORD = "";
$DATABASENAME = "";
$high = 2000;
$start = microtime(TRUE);
for($i = 0; $i <$high; $i++)
{
$mysql =
mysqli_connect($SERVER,$USERNAME,$PASSWORD,$DATABASENAME);
mysqli_query($mysql, "UPDATE test SET title = '" .
mysqli_real_escape_string($mysql,"test") . "' WHERE test_id = " .
null);
mysqli_close($mysql);
}
printf("time: %s secs, memory usage %s MiB.\n",
number_format(microtime(TRUE) - $start, 2),
number_format(memory_get_usage() / 1024 / 1024, 2));
?>
Expected result:
----------------
time: 1.83 secs, memory usage 0.15 MiB. (php 5.2.6)
Actual result:
--------------
time: 29.82 secs, memory usage 0.40 MiB
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50571&edit=1
Thread (8 messages)