Index a sum column

后端 未结 5 1509
执念已碎
执念已碎 2021-02-07 02:07

Is creating an index for a column that is being summed is faster than no index?

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-07 02:24

    No. Indexes improve searches by limiting how many checks are required. An aggregate function (count, max, min, sum, avg) has to run through all the entries in a column regardless.

提交回复
热议问题