MySQL Forums
Forum List  »  PHP

MySQL/PHP on Vista very slow...why?
Posted by: Saul Krimsly
Date: December 03, 2007 10:23AM

I just installed MySQL 5.0.45 and PHP 5 on a fast Vista Home Premium notebook with 2G memory--I use this computer for client demonstrations--and noticed that MySQL queries run especially slow, even for relatively small database tables.

From my Windows 2000 and XP servers, queries POSTed to IIS6/PHP/MySQL take microseconds to process and perhaps a tenth of a second to display the results in a browser table. However, the same database query on the Vista setup (with IIS7, using php_mysql) takes between .6 and .9 seconds to process and display. Any ideas why or how to correct this?

BTW, the install was difficult and most of the online guides were incomplete...I even had to manually edit the Envormental Path to include C:\php and C:\php\ext before PHP would recognize the php_mysql.dll.

My typical php script looks like this...

//filename: query_result_rows.php
if (mysql_errno ())
die("! $showerr");
// display the count or zero
echo "$NumReturnedRows\r";
// return the result, if any
if ($NumReturnedRows>0)
while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
foreach ($line as $col_value)
echo "$col_value|";
echo "\r";

Thanks, Saul Krimsly.

Options: ReplyQuote

Written By
MySQL/PHP on Vista very slow...why?
December 03, 2007 10:23AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.