Open qw4990 opened 3 years ago
What're your options? @zz-jason @winoros @eurekaka @time-and-fate
Interesting! I can't reproduce this locally (with or without TiKV). I agree it makes sense that ignore should prevent usage for row estimation, but it's not a strong preference. However, if the index is invisible then it should never be used.
Development Task
As shown in the above case, although the index
(a, b)
is ignored in the second SQL, it also affects the estimation rows, since it has a differentestRows
than the first SQL. How about removing the effect of ignored indexes on estimation? It seems more rational and has no side effects.In addition, it may be useful when testing the optimizer, for example, we can use the
ignore hint
to test indexes' impact on estimation.