Slow distinct query in SQL Server over large dataset

前端 未结 10 2594
情深已故
情深已故 2021-02-14 00:27

We\'re using SQL Server 2005 to track a fair amount of constantly incoming data (5-15 updates per second). We noticed after it has been in production for a couple months that on

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-14 01:01

    I should try something like this:

    SELECT typeName FROM [types] WITH (nolock)
    group by typeName;
    

    And like other i would say you need to normalize that column.

提交回复
热议问题