All pastes #515960 Raw Edit

Unnamed

public text v1 · immutable
#515960 ·published 2007-05-28 13:24 UTC
rendered paste body
V. Answer the follow up question(s) based on the below:

explain SELECT * FROM job JOIN job_postings ON (job.jobid = job_postings.jobid) JOIN companies ON companies.companyid = job.companyid WHERE job.jobid IN (16189,16188);

+--------------+-------+-------------------+---------+---------+-------+------+-------------+
| table        | type  | possible_keys     | key     | key_len | ref   | rows | Extra       |
+--------------+-------+-------------------+---------+---------+-------+------+-------------+
| job          | const | PRIMARY,companyid | PRIMARY |       4 | const |    2 |             |
| companies    | const | PRIMARY           | PRIMARY |       4 | const |    2 |             |
| job_postings | ref   | PRIMARY           | PRIMARY |       4 | const |    8 | Using where |
+--------------+-------+-------------------+---------+---------+-------+------+-------------+
3 rows in set (0.00 sec)

Follow Up Question(s)
1. Explain any optimizations that can be made to the above query.
2. How many rows will be analyzed by this query?