What is the effect of adding STRAIGHT JOINs to the query?

A complex query consists of eight populated tables that are all connected via INNER JOIN
operands as shown:

You modify the query and replace the SELECT operand with SELECT STRAIGHT JOIN.
What is the effect of adding STRAIGHT JOINs to the query?

A complex query consists of eight populated tables that are all connected via INNER JOIN
operands as shown:

You modify the query and replace the SELECT operand with SELECT STRAIGHT JOIN.
What is the effect of adding STRAIGHT JOINs to the query?

A.
The optimizer processes only the JOINs in the sequence listed in the query.

B.
The optimizer will only JOIN the tables by using their PRIMARY KEYS or UNIQUE
constraints.

C.
The optimizer will only JOIN the tables in sequence from smallest to largest.

D.
The optimizer ignores all terms in the WHERE clause until all JOINs have been
completed.



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Avishek

Avishek

A is correct I believe

Ice

Ice

A ,by using STRAIGHT JOIN ,the left table is always read before the right table .

Jay

Jay

From MySQL 5.0 Certification Study Guide by Dubois, Hinz, and Pedersen:
If you want to force MySql to join tables in a particular order, begin the query with SELECT_STRAIGHT_JOIN rather than SELECT, and then list the tables in the desired order in the FROM clause.
Which supports A.