Page 1 of 1

Poorer Performance with SQL Server 2000 and PHP5

Posted: Thu Jul 13, 2006 12:50 pm
by OakBehringer
Hi,

Details:

SQL Server 2000
PHP5

Using the mssql_connect() functions, database queries are not executed as efficiently as they need to be. I believe the problem is the time it takes for php to connect to the SQL server. Actually, I know it is as the exact same query executes as expected using Enterprise Manager. Creatign the exact same page in Coldfusion loads faster.

There is not a huge difference. Coldfusion will return the page request in a couple miliseconds, PHP takes about one second. This may not seem like a big problem, but it degrades performance a bit when using, for example, the onkeyup event in an AJAX environment. When the requests take a second to return the results are not as snappy as they should be. As they are using an identical query in a Coldfusion page.

Are the mssql_* functions known to be a little slow? Will connecting with a connection string or using ADO be faster?

Thank you,
Oak

Posted: Thu Jul 13, 2006 12:56 pm
by Weirdan
using mssql_pconnect() might somewhat improve the performance... try it :)

Posted: Thu Jul 13, 2006 3:57 pm
by OakBehringer
Nope, it doesn't.

It seems like, when the page loads, it is taking more time for php to reach the sql server than ColdFusion is or Ent. Manager is.