SQL Server 2008: Ordering by datetime is too slow

前端 未结 7 1953
鱼传尺愫
鱼传尺愫 2020-12-14 01:56

My table (SQL Server 2008) has 1 million+ records, when I try to order records by datetime, it takes 1 second, but when I order by ID (int), it only takes about 0.1 second.<

7条回答
  •  旧时难觅i
    2020-12-14 02:23

    Add the date time to a new index, adding it to the id one will still not help much.

提交回复
热议问题