You are here: MSSQL connection from PHP slower when server is remote (crosspost) « PHP Programming Language « IT news, forums, messages
MSSQL connection from PHP slower when server is remote (crosspost)

Posted by gharmel on 12/23/05 03:50

I'm trying to get some clues on why I get (much) slower responses from
my PHP applications when dealing with a remote sql server as opposed to
a local sql server.

Here's my situation:

Server #1
MSSQL 2000 sp4
Windows 2000 Server
PHP4 on IIS5 (CGI)

Server #2
MSSQL 2000 sp4
Windows 2003 Server
PHP4 on IIS6 (CGI)

Server #1 and #2 are on the same local network and the same switch. We
use TCP/IP as the connection protocol and our connections use IPs
instead of domain names.

Server#1PHP --> Server#2 MSSQL = slow
Server#2PHP --> Server#1 MSSQL = slow
Server#1PHP --> Server#1 MSSQL = fast
Server#2PHP --> Server#2 MSSQL = fast

This slower behavior is most noticable when many stored procedures
(10-15) are being executed on one php page. When the database is local
on a page such as this, the response time is around 2 seconds. When the
sql server is remote, the response time is between 8 and 15 seconds.

Does this make sense at all? Does anyone have any ideas of what the
bottleneck could be?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация