All pastes #510348 Raw Edit

Mine

public sql v1 · immutable
·published 2007-05-25 21:20 UTC
rendered paste body
mysql>  explain select c.* FROM companies AS c JOIN users AS u USING(companyid) JOIN jobs AS j USING(userid) JOIN useraccounts AS ua USING(userid) WHERE j.jobid = 1;+----+-------------+-------+--------+---------------+---------+---------+------------------+------+-------------+| id | select_type | table | type   | possible_keys | key     | key_len | ref              | rows | Extra       |+----+-------------+-------+--------+---------------+---------+---------+------------------+------+-------------+|  1 | SIMPLE      | u     | index  | PRIMARY       | PRIMARY | 4       | NULL             |    2 | Using index ||  1 | SIMPLE      | c     | eq_ref | PRIMARY       | PRIMARY | 4       | test.u.companyid |    1 |             ||  1 | SIMPLE      | ua    | eq_ref | PRIMARY       | PRIMARY | 4       | test.c.userid    |    1 | Using index ||  1 | SIMPLE      | j     | eq_ref | PRIMARY       | PRIMARY | 4       | test.c.userid    |    1 | Using where |+----+-------------+-------+--------+---------------+---------+---------+------------------+------+-------------+4 rows in set (0.00 sec)