iarp Posted September 24, 2015 Share Posted September 24, 2015 Hi All, I am at a loss. I have a web server that used to run beautifully (IIS/PHP) and something has just caused it to tank. I can run queries directly against the SQL Server database and get 700+ row results in 3 seconds. However when I connect via PDO, ->prepare the query and then ->execute the execution can take 50+ seconds to run. Even just a ->query takes the same length of time. The query I am issue has no parameters, the values are hardcoded and controlled by me. I'm at a loss as to what to look into next, nothing I do changes the time factor. I've tried turning off emulating prepares, but prepares happen instantly. I've been tracking how long it takes and this is what my log looks like START|2015-09-23 21:48:50 PREPARED|2015-09-23 21:48:50 EXECUTED|2015-09-23 21:49:43 FETCHED|2015-09-23 21:49:44 SENT|2015-09-23 21:49:44 Quote Link to comment Share on other sites More sharing options...
iarp Posted September 24, 2015 Author Share Posted September 24, 2015 I decided to try running SQL Server Profiler to figure out if maybe SQL was taking forever to issue the query. So I'm sitting here, Profiler on one screen and my test script on another. I refresh my test script and see the connection open within Profiler. It sits there for 50 seconds exactly, then I see the query gets issued to SQL, executed, 3 seconds later it returns all data. Quote Link to comment Share on other sites More sharing options...
scootstah Posted September 25, 2015 Share Posted September 25, 2015 Are you connecting to the database server with a domain or an IP? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.