Somtimes 'SELECT getdate()' takes 5 sec to complete

I can think of a number of reasons:

* Machine is under memory pressure, and SQL Server have in some parts been swapped out.

* High CPU pressure because of several massively parallel queries.

* You have run out of worker threads.

* You have a 32-bit instance and have run out of mem-to-leave.

And there are probably quite a few more.

Could you please post the output of "SELECT @@version"? What are the specs of your hardware? Virtual or physical server?

Have you checked the SQL Server errorlog to see if there any unusual messages around these events?

January 31st, 2015 5:40am

Hi Everyone,

We have a sql server 2008 R2, on which 'Select Getdate()' randomly takes long time( 5 second) to complete. Does anybody know what can be the possible  issue?

Regards,

Free Windows Admin Tool Kit Click here and download it now
January 31st, 2015 9:32am

Interesting....Can you try with CURRENT_TIMESTAMP and see the performance?

Select CURRENT_TIMESTAMP

January 31st, 2015 10:08am

How busy is the server when this happens? Run perfmon and correlate the timings and see if any of the counters stand out i.e. check if you have some hardware pressure or too many spids, etc.
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2015 10:50am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics