好多这样的“Copying to tmp table on disk”

解决方案 »

  1.   


    6474 root localhost:3341 a001404_ss Query 961 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=85770
    6475 root localhost:3342 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6479 root localhost:3347 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6482 root localhost:3350 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 and title like '%%' order by editdate DESC,
    6489 root localhost:3357 a001404_ss Query 949 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=91945
    6490 root localhost:3358 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 and title like '%%' order by editdate DESC,
    6495 root localhost:3363 a001404_ss Query 952 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6496 root localhost:3364 a001404_ss Query 948 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=112516
    6499 root localhost:3367 a001404_ss Query 948 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6532 root localhost:3402 a001404_ss Query 941 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=86210
    6535 root localhost:3405 a001404_ss Query 942 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6541 root localhost:3411 a001404_ss Query 941 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6608 root localhost:3478 a001404_ss Query 906 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=94703
    6622 root localhost:3492 a001404_ss Query 906 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=109425
    6629 root localhost:3499 a001404_ss Query 823 Copying to tmp table on disk select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6640 root localhost:3511 a001404_ss Query 824 Copying to tmp table on disk select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6646 root localhost:3517 a001404_ss Query 906 Locked UPDATE destoon_sell SET hits=hits+1 WHERE itemid=81386
    6655 root localhost:3526 a001404_ss Query 906 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=92632
    6658 root localhost:3529 a001404_ss Query 905 Locked UPDATE destoon_sell SET edittime='1409571808',editdate='2014-09-01' WHERE itemid=111313
    6675 root localhost:3546 a001404_ss Query 903 Locked INSERT INTO destoon_sell (typeid,title,catid,brand,thumb,totime,unit,price,minamount,amount,days,myc
    6679 root localhost:3550 a001404_ss Query 902 Locked UPDATE destoon_sell SET hits=hits+1 WHERE itemid=63615
    6689 root localhost:3560 a001404_ss Query 898 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=88045
    6690 root localhost:3561 a001404_ss Query 898 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=81301
    6696 root localhost:3567 a001404_ss Query 884 Locked UPDATE destoon_sell SET edittime='1409571814',editdate='2014-09-01' WHERE itemid=109434
    6713 root localhost:3584 a001404_ss Query 893 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6716 root localhost:3587 a001404_ss Query 868 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=90996
    6730 root localhost:3601 a001404_ss Query 882 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=73269
    6742 root localhost:3613 a001404_ss Query 888 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6770 root localhost:3641 a001404_ss Query 881 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6771 root localhost:3642 a001404_ss Query 865 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=75410
    6773 root localhost:3644 a001404_ss Query 865 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=115264
    6774 root localhost:3645 a001404_ss Query 865 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=105575
    6777 root localhost:3648 a001404_ss Query 876 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6783 root localhost:3654 a001404_ss Query 869 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6809 root localhost:3680 a001404_ss Query 864 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6841 root localhost:3712 a001404_ss Query 861 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6854 root localhost:3725 a001404_ss Query 857 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6859 root localhost:3730 a001404_ss Query 856 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6867 root localhost:3739 a001404_ss Query 211 Sending data select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6874 root localhost:3746 a001404_ss Query 819 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=75127
    6878 root localhost:3750 a001404_ss Query 308 Sending data select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6885 root localhost:3757 a001404_ss Query 839 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6892 root localhost:3765 a001404_ss Query 819 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=117553
    6893 root localhost:3766 a001404_ss Query 773 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=92760
    6894 root localhost:3767 a001404_ss Query 773 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=117998
    6921 root localhost:3794 a001404_ss Query 822 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6927 root localhost:3800 a001404_ss Query 822 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6970 root localhost:3843 a001404_ss Query 309 Sending data select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6993 root localhost:3871 a001404_ss Query 799 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7012 root localhost:3890 a001404_ss Query 785 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7014 root localhost:3892 a001404_ss Query 768 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=75400
    7016 root localhost:3894 a001404_ss Query 768 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=114290
    7017 root localhost:3895 a001404_ss Query 785 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7027 root localhost:3905 a001404_ss Query 776 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7061 root localhost:3939 a001404_ss Query 766 Copying to tmp table select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7068 root localhost:3946 a001404_ss Query 754 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=77070
    7070 root localhost:3948 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7077 root localhost:3955 a001404_ss Query 736 Copying to tmp table on disk
    7078 root localhost:3956 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7087 root localhost:3965 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7094 root localhost:3972 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7096 root localhost:3974 a001404_ss Query 309 Copying to tmp table select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    7104 root localhost:3982 a001404_ss Query 754 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=92632
    7116 root localhost:3994 a001404_ss Query 766 converting HEAP to MyISAM select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7135 root localhost:4014 a001404_ss Query 715 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=90448
    7143 root localhost:4022 a001404_ss Query 754 Copying to tmp table on disk select * from (select * from 
      

  2.   

    6474 root localhost:3341 a001404_ss Query 961 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=85770
    6475 root localhost:3342 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6479 root localhost:3347 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6482 root localhost:3350 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 and title like '%%' order by editdate DESC,
    6489 root localhost:3357 a001404_ss Query 949 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=91945
    6490 root localhost:3358 a001404_ss Query 954 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 and title like '%%' order by editdate DESC,
    6495 root localhost:3363 a001404_ss Query 952 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6496 root localhost:3364 a001404_ss Query 948 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=112516
    6499 root localhost:3367 a001404_ss Query 948 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6532 root localhost:3402 a001404_ss Query 941 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=86210
    6535 root localhost:3405 a001404_ss Query 942 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6541 root localhost:3411 a001404_ss Query 941 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6608 root localhost:3478 a001404_ss Query 906 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=94703
    6622 root localhost:3492 a001404_ss Query 906 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=109425
    6629 root localhost:3499 a001404_ss Query 823 Copying to tmp table on disk select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6640 root localhost:3511 a001404_ss Query 824 Copying to tmp table on disk select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6646 root localhost:3517 a001404_ss Query 906 Locked UPDATE destoon_sell SET hits=hits+1 WHERE itemid=81386
    6655 root localhost:3526 a001404_ss Query 906 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=92632
    6658 root localhost:3529 a001404_ss Query 905 Locked UPDATE destoon_sell SET edittime='1409571808',editdate='2014-09-01' WHERE itemid=111313
    6675 root localhost:3546 a001404_ss Query 903 Locked INSERT INTO destoon_sell (typeid,title,catid,brand,thumb,totime,unit,price,minamount,amount,days,myc
    6679 root localhost:3550 a001404_ss Query 902 Locked UPDATE destoon_sell SET hits=hits+1 WHERE itemid=63615
    6689 root localhost:3560 a001404_ss Query 898 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=88045
    6690 root localhost:3561 a001404_ss Query 898 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=81301
    6696 root localhost:3567 a001404_ss Query 884 Locked UPDATE destoon_sell SET edittime='1409571814',editdate='2014-09-01' WHERE itemid=109434
    6713 root localhost:3584 a001404_ss Query 893 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6716 root localhost:3587 a001404_ss Query 868 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=90996
    6730 root localhost:3601 a001404_ss Query 882 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=73269
    6742 root localhost:3613 a001404_ss Query 888 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6770 root localhost:3641 a001404_ss Query 881 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6771 root localhost:3642 a001404_ss Query 865 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=75410
    6773 root localhost:3644 a001404_ss Query 865 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=115264
    6774 root localhost:3645 a001404_ss Query 865 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=105575
    6777 root localhost:3648 a001404_ss Query 876 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6783 root localhost:3654 a001404_ss Query 869 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6809 root localhost:3680 a001404_ss Query 864 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6841 root localhost:3712 a001404_ss Query 861 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6854 root localhost:3725 a001404_ss Query 857 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6859 root localhost:3730 a001404_ss Query 856 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6867 root localhost:3739 a001404_ss Query 211 Sending data select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6874 root localhost:3746 a001404_ss Query 819 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=75127
    6878 root localhost:3750 a001404_ss Query 308 Sending data select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6885 root localhost:3757 a001404_ss Query 839 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6892 root localhost:3765 a001404_ss Query 819 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=117553
    6893 root localhost:3766 a001404_ss Query 773 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=92760
    6894 root localhost:3767 a001404_ss Query 773 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=117998
    6921 root localhost:3794 a001404_ss Query 822 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6927 root localhost:3800 a001404_ss Query 822 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    6970 root localhost:3843 a001404_ss Query 309 Sending data select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    6993 root localhost:3871 a001404_ss Query 799 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7012 root localhost:3890 a001404_ss Query 785 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7014 root localhost:3892 a001404_ss Query 768 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=75400
    7016 root localhost:3894 a001404_ss Query 768 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=114290
    7017 root localhost:3895 a001404_ss Query 785 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7027 root localhost:3905 a001404_ss Query 776 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7061 root localhost:3939 a001404_ss Query 766 Copying to tmp table select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7068 root localhost:3946 a001404_ss Query 754 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=77070
    7070 root localhost:3948 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7077 root localhost:3955 a001404_ss Query 736 Copying to tmp table on disk
    7078 root localhost:3956 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7087 root localhost:3965 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7094 root localhost:3972 a001404_ss Query 766 Copying to tmp table on disk select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7096 root localhost:3974 a001404_ss Query 309 Copying to tmp table select * from (select * from destoon_sell where groupid=6 or groupid=5  order by editdate DESC,editt
    7104 root localhost:3982 a001404_ss Query 754 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=92632
    7116 root localhost:3994 a001404_ss Query 766 converting HEAP to MyISAM select * from (select * from destoon_sell where status=3 order by editdate DESC,edittime DESC) t  gr
    7135 root localhost:4014 a001404_ss Query 715 Locked UPDATE LOW_PRIORITY destoon_sell SET hits=hits+1 WHERE itemid=90448
    7143 root localhost:4022 a001404_ss Query 754 Copying to tmp table on disk select * from (select * from 
      

  3.   

    是不是有什么 alter table 操作?或者检查一下慢查询日志。
      

  4.   

    show processlist;看看哪些sql卡住了
      

  5.   


    上面的上面的上面,就是show processlist的部份结果
      

  6.   


    order by rand()卡死了...
    有啥其它好方法实现随机么
      

  7.   

    order by rand()的性能非常差,前两天有一个帖子也是讨论这个问题,最后比较好的结果是使用外部程序生成随机数,然后精确查询这些随机数order by rand()卡死了...
    有啥其它好方法实现随机么
      

  8.   


    order by rand()卡死了...
    有啥其它好方法实现随机么请参考我的方案:http://blog.csdn.net/mchdba/article/details/38925129
      

  9.   


    order by rand()卡死了...
    有啥其它好方法实现随机么请参考我的方案:http://blog.csdn.net/mchdba/article/details/38925129
    order by rand()这个是什么业务场景,感觉挺诡异的。