Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 1 to 1 of 1 « Previous | Next »
Displaying posts with tag: mysql・DB (reset)
MySQL のJOIN に関するメモ

内容

  • FROM 句のテーブルの順番と、MySQL がテーブルをJOIN する順番は別
  • STRAIGHT_JOIN と eq_ref, ref
  • eq_ref になるようにするために
  • JOIN 条件の書き方
  • STRAIGHT_JOIN をいつ使うか


今回の検証に用いたMySQL は4.0.26。また、例として、以下のテーブルを用いる。(テーブルは、「逆算式SQL教科書」のもの)

[study]> SHOW FIELDS FROM uriage;
+-------------+---------+------+-----+---------+----------------+
| Field       | Type    | Null | Key | Default | Extra          |
+-------------+---------+------+-----+---------+----------------+
| denpyo_no   | int(11) | NO   | PRI | …
[さらに読む]