Poorer Performance with SQL Server 2000 and PHP5

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
OakBehringer
Forum Newbie
Posts: 2
Joined: Thu Jul 13, 2006 12:45 pm

Poorer Performance with SQL Server 2000 and PHP5

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

using mssql_pconnect() might somewhat improve the performance... try it :)
OakBehringer
Forum Newbie
Posts: 2
Joined: Thu Jul 13, 2006 12:45 pm

Post 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.
Post Reply