June 26, 2009 at 2:03 pm
Hi. I've a partitioned table based on 6 months. each partition has 2 files(1fg).
All I'm running is a simple count(*) below. The cpu usage goes to a 100% right away. Is it expected or what can i do to rectify it?
select count(*) from db1.dbo.table1 with (nolock)
where col1<'2008-03-26'
table1 is partitioned on col1.col1 is a datetime field
Server has 4gb of RAM and 2 CPU's (Intel xeon 2.8ghz)
Tej
June 26, 2009 at 2:44 pm
tejas parikh (6/26/2009)
Hi. I've a partitioned table based on 6 months. each partition has 2 files(1fg).All I'm running is a simple count(*) below. The cpu usage goes to a 100% right away. Is it expected or what can i do to rectify it?
select count(*) from db1.dbo.table1 with (nolock)
where col1<'2008-03-26'
table1 is partitioned on col1.col1 is a datetime field
Server has 4gb of RAM and 2 CPU's (Intel xeon 2.8ghz)
Tej
Do you have an index on col1?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 3:10 pm
yes, clustered on col1. partitioned on the scheme used to partition table
June 26, 2009 at 6:58 pm
In that case, if the CPU spikes for more than an hundred milliseconds or so, I'd have to say something is wrong.
Can't help without a bit more information:
1. How many rows are you talking about in the tables?
2. What count are you expecting?
3. What does the clustered index actually look like?
4. When was the last time the clustered index was rebuilt on both tables?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 27, 2009 at 9:58 am
Afternoon,
I may be jumping the gun a little here but in addition to Jeff's requested information, some details regarding your disk subsystem may also be useful.
For example, are you using a SAN, number of LUN's, number of disks etc.
You see, I am wondering if you are only using a single disk drive to store your data files and are thereby causing the disk queue to saturate. You can check your disk queue length by using the Windows PerfMon.
Cheers,
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply