473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Query is slow sometimes

What might be going on here? The Query is against a single table with
some criteria. The database is active with upto 200 connected users
and at peak times there are 10 or more active sessions. Most of the
time, the query comes back in milliseconds. Occasionally though, it it
can take a whole minute. I've been watching CPU, Memory, Disk. None
of these appear to be the bottlenecking. (CPU usually below 10% and
always below 50%, pages/sec is 0, and disk % is low and does not
spikes during hangs) I also checked to see if hangs were synching with
Tlog backups or other scheduled jobs, but that is not the case. The
box has good hardware 4GB RAM and 2 CPU at 3.4 GHz. What could be
holding this query up?

Thanks for any ideas.

Dave

Sep 13 '06 #1
1 1803
(tr*********@yahoo.com) writes:
What might be going on here? The Query is against a single table with
some criteria. The database is active with upto 200 connected users
and at peak times there are 10 or more active sessions. Most of the
time, the query comes back in milliseconds. Occasionally though, it it
can take a whole minute. I've been watching CPU, Memory, Disk. None
of these appear to be the bottlenecking. (CPU usually below 10% and
always below 50%, pages/sec is 0, and disk % is low and does not
spikes during hangs) I also checked to see if hangs were synching with
Tlog backups or other scheduled jobs, but that is not the case. The
box has good hardware 4GB RAM and 2 CPU at 3.4 GHz. What could be
holding this query up?
Have you checked for blocking updates? That's the most obvious thing to
look for.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Sep 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Fountain | last post by:
We've recently enabled slow query logging on a server and it's proving interesting seeing which queries are bogging things down. This one is puzzling me a little: SELECT articleid, type,...
3
by: Brian Oster | last post by:
After applying security patch MS03-031 (Sql server ver 8.00.818) a query that used to execute in under 2 seconds, now takes over 8 Minutes to complete. Any ideas on what the heck might be going...
5
by: John Bailo | last post by:
I wrote a webservice to output a report file. The fields of the report are formatted based on information in an in-memory XmlDocument. As each row of a SqlDataReader are looped through, a...
7
by: Thomi Baechler | last post by:
Hello Everybody I run the following query against to identical databases. Execution time on the first DB is 0 seconds, on the other 6 seconds! SELECT dbo.HRMABZ.EMPKEY ,...
7
by: Egor Shipovalov | last post by:
I'm implementing paging through search results using cursors. Is there a better way to know total number of rows under a cursor than running a separate COUNT(*) query? I think PostgreSQL is bound...
3
by: Not Me | last post by:
Hi, In the past I seem to have been able to speed up queries by making them a join rather than ... not a join :o) An example would be select * from x where a in (select a from y) would...
1
by: Suzi Carr | last post by:
Hello, We create querydefs in VB programs (i.e. CreateQueryDef). But as illustrated below, Access regenerates the SQL code we specify -- particularly the WHERE clause. While the new code is...
6
by: Bill R via AccessMonster.com | last post by:
I have a query: SELECT tblCalendar.CalendarDay AS LastSunday FROM tblCalendar WHERE (((tblCalendar.CalendarDay)>=(Now()-7) And (tblCalendar.CalendarDay)...
4
by: shawno | last post by:
Hello, We are currently in the process of migrating our databases from a relic of a server to a new 4 processor dual-core box with 4 gigs of RAM. Overall, database performance is obviously...
9
by: Bob Darlington | last post by:
The following query opens slowly the first time it is opened (6-7 seconds), but then is less than one second for the next random number of openings before slowing (6-7 seconds) again. SELECT...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.