From: millennium at qme dot nl
Operating system: Windows Server 2003
PHP version: 5.3.1
PHP Bug Type: MySQLi related
Bug description: Performance Mysqli in php 5.3.1 signific slower than 5.2.6
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 bug report at http://bugs.php.net/?id=50571&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50571&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50571&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50571&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50571&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50571&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50571&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50571&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50571&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50571&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50571&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50571&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50571&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50571&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50571&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50571&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50571&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50571&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50571&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50571&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50571&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50571&r=mysqlcfg