June 30, 2014 at 5:41 am
I have a chart which updates every 5 seconds it takes 5 ms to update the chart and 5ms to retrieve the latest 720 records in a table on a local server.
after the PC wakes from sleep the Sql takes 26ms to retrieve the same data .
The data is just two fields a datetime and an int.
I have the sql running in a background worker. In VS.net 2013
I am using 2012 express - win 7 PC and win 7 server.
It is not a major problem but I am intrigued as to why this is happening.
Has anyone any idea?
edit : sql if it males any difference is
SELECT TOP 720 datestamp, GridFlow FROM Feeds
ORDER BY DateStamp DESC;
thanks in advance
Mike
June 30, 2014 at 6:32 am
Is the machine you're querying from and the data location and the machine going to sleep, all the same machine? If so, I suspect you're probably seeing some memory artifact from the sleep process. I wouldn't recommend having a database server on a machine that can go to sleep. If not, I'm not sure.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 30, 2014 at 8:29 am
Grant Fritchey (6/30/2014)
Is the machine you're querying from and the data location and the machine going to sleep, all the same machine? If so, I suspect you're probably seeing some memory artifact from the sleep process. I wouldn't recommend having a database server on a machine that can go to sleep. If not, I'm not sure.
Hi Thanks
No they are two separate machines. the server is never switched off and never sleeps as it's gathering data.
It's my main PC that is running my monitoring program that sleeps. Then when I wake it I noticed that the data retrieval takes longer.
Mike
June 30, 2014 at 8:40 am
Not sure then in that case. I've seen poor performance in some machines after waking, but not a specific query issue with SQL Server.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 30, 2014 at 9:01 am
How long after you wake the machine are you waiting to do this data retrieval?
Long enough to have other tasks run first?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 30, 2014 at 9:11 am
well, first, 26 milliseconds is fast. the difference is pretty minimal for things under 50 milliseconds, i don't know if it's worth investigating much.
also, how are you measuring this? is this a one time "it takes 26 milliseconds" after wakeup, and thereafter it takes the normal 5?
or is it every time it's measured after sleeping, it's 26 milliseconds?
could there be other resources hitting the server, that causes the tiny amount of slowdown?
could it be that because the laptop went to sleep,the data was paged out of memory because it's not being used, nad s it had to be loaded from disk?
Lowell
June 30, 2014 at 9:15 am
Lowell (6/30/2014)
well, first, 26 milliseconds is fast. the difference is pretty minimal for things under 50 milliseconds, i don't know if it's worth investigating much....
could it be that because the laptop went to sleep,the data was paged out of memory because it's not being used, and it had to be loaded from disk?
Very possible on that one.
I was also thinking the PC has not fully awakened. I have seen my NIC perform slower after wakeup until the buffers get primed. Maybe that is the case here too.
But 5ms v 26ms is not that big.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 30, 2014 at 10:23 am
Lowell (6/30/2014)
well, first, 26 milliseconds is fast. the difference is pretty minimal for things under 50 milliseconds, i don't know if it's worth investigating much.also, how are you measuring this? is this a one time "it takes 26 milliseconds" after wakeup, and thereafter it takes the normal 5?
or is it every time it's measured after sleeping, it's 26 milliseconds?
could there be other resources hitting the server, that causes the tiny amount of slowdown?
could it be that because the laptop went to sleep,the data was paged out of memory because it's not being used, nad s it had to be loaded from disk?
Hi and Thanks
No I leave it running for hours and it stays the same 26ms which as you say is not really a worry just interesting 😉
I haven't tried it yet but I wonder what happens when it goes to sleep again? does it take longer (pops off to try it !) no it stays at 26ms . 😉
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply