-
Chaithra Gopalareddy authored
CERTAIN CONDITIONS Problem: Optimizer chooses a wrong index to fetch the doc_id which is present only in a full-text index Analysis: For the testcase presented, score can be got only when idx2 is used. But optimizer checks that idx_1 is covering and sets that index to be used. Since doc_id is needed to get score, and as doc_id can only be got from idx_2, optimizer should not set idx_1 as covering. Solution: This is backport from 5.7. As part of the solution a new field is added in table structure and is set when FTS_DOC_ID field is present. no_keyread is set to true in this case indicating that no key can be set as covering.
Chaithra Gopalareddy authoredCERTAIN CONDITIONS Problem: Optimizer chooses a wrong index to fetch the doc_id which is present only in a full-text index Analysis: For the testcase presented, score can be got only when idx2 is used. But optimizer checks that idx_1 is covering and sets that index to be used. Since doc_id is needed to get score, and as doc_id can only be got from idx_2, optimizer should not set idx_1 as covering. Solution: This is backport from 5.7. As part of the solution a new field is added in table structure and is set when FTS_DOC_ID field is present. no_keyread is set to true in this case indicating that no key can be set as covering.
Loading