服务器变量和设置 
 变量   会话值   全局值  
back log  500  500  
basedir  /  /  
binlog cache size  32768  32768  
bulk insert buffer size  8388608  8388608  
character set  latin1  latin1  
character sets  latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5  latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5  
concurrent insert  ON  ON  
connect timeout  5  5  
convert character set    
datadir  /dba/mysql/  /dba/mysql/  
default week format  0  0  
delay key write  ON  ON  
delayed insert limit  100  100  
delayed insert timeout  300  300  
delayed queue size  1000  1000  
flush  OFF  OFF  
flush time  0  0  
ft boolean syntax  + -><()~*:""&|  + -><()~*:""&|  
ft min word len  4  4  
ft max word len  254  254  
ft max word len for sort  20  20  
ft stopword file  (built-in)  (built-in)  
have bdb  NO  NO  
have crypt  YES  YES  
have innodb  DISABLED  DISABLED  
have isam  YES  YES  
have raid  NO  NO  
have symlink  YES  YES  
have openssl  NO  NO  
have query cache  YES  YES  
init file    
innodb additional mem pool size  1048576  1048576  
innodb buffer pool size  8388608  8388608  
innodb data file path    
innodb data home dir    
innodb file io threads  4  4  
innodb force recovery  0  0  
innodb thread concurrency  8  8  
innodb flush log at trx commit  1  1  
innodb fast shutdown  ON  ON  
innodb flush method    
innodb lock wait timeout  50  50  
innodb log arch dir    
innodb log archive  OFF  OFF  
innodb log buffer size  1048576  1048576  
innodb log file size  5242880  5242880  
innodb log files in group  2  2  
innodb log group home dir    
innodb mirrored log groups  1  1  
innodb max dirty pages pct  90  90  
interactive timeout  600  600  
join buffer size  131072  131072  
key buffer size  536870912  536870912  
language  /usr/share/mysql/english/  /usr/share/mysql/english/  
large files support  ON  ON  
local infile  ON  ON  
locked in memory  OFF  OFF  
log  OFF  OFF  
log update  OFF  OFF  
log bin  OFF  OFF  
log slave updates  OFF  OFF  
log slow queries  OFF  OFF  
log warnings  OFF  OFF  
long query time  10  10  
low priority updates  OFF  OFF  
lower case table names  0  0  
max allowed packet  4193280  4193280  
max binlog cache size  4294967295  4294967295  
max binlog size  1073741824  1073741824  
max connections  512  512  
max connect errors  30000  30000  
max delayed threads  20  20  
max heap table size  16777216  16777216  
max join size  4294967295  4294967295  
max relay log size  0  0  
max seeks for key  4294967295  4294967295  
max sort length  1024  1024  
max user connections  0  0  
max tmp tables  32  32  
max write lock count  4294967295  4294967295  
myisam max extra sort file size  268435456  268435456  
myisam max sort file size  2147483647  2147483647  
myisam repair threads  1  1  
myisam recover options  OFF  OFF  
myisam sort buffer size  134217728  134217728  
net buffer length  8192  8192  
net read timeout  30  30  
net retry count  10  10  
net write timeout  60  60  
new  OFF  OFF  
open files limit  2570  2570  
pid file  /dba/mysql/company.pid  /dba/mysql/company.pid  
log error    
port  3306  3306  
protocol version  10  10  
query alloc block size  8192  8192  
query cache limit  1048576  1048576  
query cache size  8388608  8388608  
query cache type  ON  ON  
query prealloc size  8192  8192  
range alloc block size  2048  2048  
read buffer size  33550336  33550336  
read only  OFF  OFF  
read rnd buffer size  262144  262144  
rpl recovery rank  0  0  
server id  1  1  
slave net timeout  3600  3600  
skip external locking  ON  ON  
skip networking  OFF  OFF  
skip show database  OFF  OFF  
slow launch time  2  2  
socket  /dba/mysql/mysql.sock  /dba/mysql/mysql.sock  
sort buffer size  33554424  33554424  
sql mode  0  0  
table cache  1024  1024  
table type  MYISAM  MYISAM  
thread cache size  80  80  
thread stack  126976  126976  
tx isolation  REPEATABLE-READ  REPEATABLE-READ  
timezone  CST  CST  
tmp table size  268435456  268435456  
tmpdir  /tmp/  /tmp/  
transaction alloc block size  8192  8192  
transaction prealloc size  4096  4096  
version  4.0.18-standard  4.0.18-standard  
version comment  Official MySQL RPM  Official MySQL RPM  
wait timeout  120  120  

解决方案 »

  1.   

    Created tmp disk tables   28235  
    Created tmp tables   29010  
    感觉Created tmp disk tables   28235 过高但我把tmp_table_size =1024M
    还是没有改善~~~  
      

  2.   

    把tmp_table_size =设成8M-1024M
    对Created tmp disk tables
    居然没有影响,疑惑~~~ 
      

  3.   

    建立索引,使程序中SQL查询语句尽可能命中索引,这样速度至少会提高50%http://www.ddvip.net/database/mysql/index2/3.htm