• nope, not a valid test/way to reproduce the issue.

    here's your exact code, but loaded with random data.

    on my machine, with all four versions of SQL Server I have installed (2005/2008/2008R2/2012), it returned results in about 9 seconds.

    CREATE TABLE [dbo].[temptable2](

    [Field1] [varchar](23) NOT NULL,

    [field2] [varchar](20) NULL,

    [field3] [varchar](50) NULL,

    [field4] [datetime] NULL,

    [field5] [varchar](255) NULL

    ) ON [PRIMARY]

    Create clustered index idx1 on temptable2(field1)

    INSERT INTO temptable2

    SELECT TOP 200000

    LEFT(CONVERT(varchar(50),NEWID()),23), --23 chars

    LEFT(CONVERT(varchar(50),NEWID()),20),--20 chars

    LEFT(CONVERT(varchar(50),NEWID()),50),--50 chars

    CAST(RAND(CHECKSUM(NEWID()))*3653.0+36524.0 AS DATETIME), --datetime

    LEFT(CONVERT(varchar(255),NEWID()),255) --255 chars

    FROM sys.columns T1 cross apply sys.columns T2

    select field3,count(1)

    from temptable2

    group by field3

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!