mysql - Force Index disadvantages -
i using force index. can able use desired column key..
but wanted know disadvantages of force index
you can read article:
does mean should use force index hint?
no! using force index() indiscriminately can backfire. distribution of data or values of query parameters can change, , key thought best query can, on time, become less preferred plan. force key should used when understand why using it, , 100% sure there no way key being forced become bad.
note, need force key arises when query not straightforward , there no “awesome” winner key optimizer can spot. such needs can addressed re-writing query and/or adding better keys.
Comments
Post a Comment