Hello everyone.
So I have this SQL Server instance (see below for version) with a database containing a particular table. This table currently holds 13.38 million records that occupy a little over 6GB for data and around 700MB for its clustered index and I am currently running a CREATE NONCLUSTERED INDEX statement because there's a query that needs to be run and it is incurring into a clustered index scan that simply kills the query's performance.
The index being created only contains a datetime2 field, and this field is the second field of the clustered index (which is a 3-field unique index and not the primary key). It has been running for 51 minutes now. It feels like this performance is really bad. Is it just me or do you agree that scanning a 700MB clustered index to harvest a single field shouldn't have taken more than 5 minutes?
What would you suggest I or my SQL team should examine in order to gain an understanding as to why the low performance? That is, if you agree this is low performance.
SQL Server Version
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64)
Sep 21 2011 22:45:45
Copyright (c) 1988-2008 Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)
And this is the information I obtained by executing sp_spaceused:
tbl name 13378093 7037024 KB 6329664 KB 705416 KB 1944 KBJose R. MCP
Code Samples