1.

Which statement is used to force the optimizer to use tables in a particular order?(a) FORCE INDEX(b) USE INDEX(c) IGNORE INDEX(d) STRAIGHT_JOINI have been asked this question during an online interview.The question is from MySQL Query Optimizer topic in portion Query Optimization of MySQL

Answer»

Right answer is (d) STRAIGHT_JOIN

For explanation I would SAY: STRAIGHT_JOIN is used to force the optimizer to use TABLES in a particular ORDER. The MYSQL optimizer by default considers itself free to DETERMINE the order in which to scan tables most quickly.



Discussion

No Comment Found

Related InterviewSolutions