How to use index in select statement?

前端 未结 8 619
误落风尘
误落风尘 2020-12-12 12:42

Lets say in the employee table, I have created an index(idx_name) on the emp_name column of the table.

Do I need to explicitly specify the index name in

8条回答
  •  借酒劲吻你
    2020-12-12 13:23

    By using the column that the index is applied to within your conditions, it will be included automatically. You do not have to use it, but it will speed up queries when it is used.

    SELECT * FROM TABLE WHERE attribute = 'value'
    

    Will use the appropriate index.

提交回复
热议问题