sql mandatory use of the index

 

If the index is not used in the sql effect, you can use FORCE INDEX (index), to force the use of the index:

Example:

  SELECT COUNT(DEAL_STAT) FROM  c_pac FORCE INDEX (IDX_PACKET_DEAL_STAT)

 

Guess you like

Origin www.cnblogs.com/cnndevelop/p/11652724.html