Skip to Main Content

Japanese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

My.cnfのjoin_buffer_sizeの計算方法

user1443304Jan 28 2014

MySQLでInnoDBのテーブルAと、MyISAMのテーブルBをインデックスが設定されていないカラム同士で内部結合しようとしています。

このSQLの実行は非常に遅く、profilingでどこが遅いか調べると、Copying to tmp tableに20秒かかっていることわかりました。

InnoDBとMyISAMでは、My.cnfの設定する変数がことなるのですが、インデックスが設定されていないカラムでの結合ですので、

join_buffer_sizeを増やして速くなることを確認しました。

しかし接続数が多く、たくさんのメモリを割り当てるわけにはいきません。

join_buffer_sizeに設定するのは、(Aの取得サイズ+Bの取得サイズ)×想定接続数でよいでしょうか?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2014
Added on Jan 28 2014
0 comments
1,369 views