I encountered this question in an interview and had no clue how to answer:
There is a table which has a index on a column, and you query:
select * from table_name where column_having_index="some value";
The query takes too long, and you find out that the index is not being used. If you think the performance of the query will be better using the index, how could you force the query to use the index?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…