mysql copying to tmp table sangat lambat

Mysql tiba2 lambat banget narik data, emang querynya rodo ngeri cz kebanyakan left join, menjalankan query pada query browser (squirrel sql) saja memerlukan waktu 3 menit, apalagi jika query dijalankan lewat aplikasi web.

Bismillah,

q> gogling ketemu ini  [1] :

q>masuk dulu ke mysql

mysql -uroot -p

kemudian masukkan password mysql untuk user root

q>jalankan perintah ini

SET tmp_table_size = 5120000;

q>cek hasil perubahannya:

<span class="pln">SHOW VARIABLES </span><span class="kwd">LIKE</span><span class="str">'%tmp_table%'</span><span class="pun">;</span>

q>cek variable yang lainnya:

SHOW VARIABLES LIKE '%buffer%';

Sumber :
[1] http://themanbehindthecode.com/2011/08/12/avoid-mysql-copying-to-tmp-table/

Alhamdulillah, menampilkan report semakin cepat sekitar 5 detik


 

Published by

saifiahmada

Begin a big Process with a bit trying

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s