mysqldump
mysqldumpslow报错:Died at /usr/local/mysql/bin/mysqldumpslow line 161, chunk 236.
总结:是因为top数目太多了,mysqldumpslow遍历不过来的缘故。
/usr/local/mysql/bin/mysqldumpslow -s -t 15 /root/db01-102-slow.log
1,把r去掉试试,还是报错,参数不识别。
[root@slave ]# /usr/local/mysql/bin/mysqldumpslow -s -t 15 /root/db01-102-slow.log Reading mysql slow query log from 15 /root/db01-102-slow.logCan't open 15: 没有那个文件或目录 at /usr/local/mysql/bin/mysqldumpslow line 91.Count: 22Time=9.61s (211s)Lock=0.00s (0s)Rows=1.0 (22), [dubbo]@2hostsselect count(*)from coupon_lotleft join coupon on coupon.coupon_lot_id = coupon_lot.coupon_lot_idLEFT JOIN brandON brand.brand_id=coupon_lot.brand_idLEFT JOIN product_categoryon product_category.category_id=coupon_lot.category_idCount: 177Time=1.40s (247s)Lock=0.00s (0s)Rows=1.0 (177), [dubbo]@2hostsselect count(*) from user_infoLEFT JOIN system_region aON province_id =a.region_idLEFT JOIN system_region bON city_id = b.region_idLEFT JOIN system_region cON district_id = c.region_idCount: 22Time=13.20s (290s)Lock=0.00s (0s)Rows=10.0 (220), [dubbo]@2hostsselect coupon_id, coupon_lot.c<p style="color:transparent">本文来源gao!daima.com搞$代!码网</p>oupon_lot_id, coupon_lot.remark,coupon.code,coupon_lot.coupon_type, coupon.state,coupon_lot.ckey, coupon_lot.cvalue, coupon_lot.discount, coupon_lot.type, coupon_lot.channel, coupon_lot.is_reusable, coupon_lot.start_datetime,coupon_lot.end_datetime, coupon_lot.create_datetime, coupon.update_datetime ,coupon_lot.department,coupon_lot.state as couponLotState, coupon_lot.create_operator,coupon_lot.coupon_category,coupon_lot.pdt_code,brand.brand_name,product_category.category_namefrom coupon_lotleft join coupon on coupon.coupon_lot_id = coupon_lot.coupon_lot_idLEFT JOIN brandON brand.brand_id=coupon_lot.brand_idLEFT JOIN product_categoryon product_category.category_id=coupon_lot.category_idgroup by coupon_lot.coupon_lot_idorder by coupon_lot.create_datetime DESClimit N,NCount: 8Time=1.09s (8s)Lock=0.00s (0s)Rows=10.0 (80), [dubbo]@2hostsselect return_sn,relating_order_sn, return_from,oi.order_out_sn ,add_time , return_type, return_pay, ui.usename as userName, return_consignee, return_goods_count ,return_total_fee, total_paid, return_desc, return_order_status,return_pay_status ,return_shipping_status, order_return.lock_operator, order_return.return_invoice_nofrom order_returnLEFT JOIN order_info oion order_return.relating_order_sn = oi.order_sn left join user_info ui on oi.user_id = ui.user_idleft join order_payment on order_payment.order_sn = oi.order_snorder by order_return.add_time DESClimit N,NCount: 1Time=1.00s (1s)Lock=0.00s (0s)Rows=1.0 (1), root[root]@localhostselect sleep(N)Count: 1Time=1.13s (1s)Lock=0.00s (0s)Rows=10.0 (10), [dubbo]@[xx]select return_sn,relating_order_sn, return_from,oi.order_out_sn ,add_time , return_type, return_pay, ui.usename as userName, return_consignee, return_goods_count ,return_total_fee, total_paid, return_desc, return_order_status,return_pay_status ,return_shipping_status, order_return.lock_operator, order_return.return_invoice_nofrom order_returnLEFT JOIN order_info oion order_return.relating_order_sn = oi.order_sn left join user_info ui on oi.user_id = ui.user_idleft join order_payment on order_payment.order_sn = oi.order_snorder by order_return.add_time DESC, oi.order_sn limit N,NCount: 5Time=2.47s (12s)Lock=0.00s (0s)Rows=0.0 (0), [dubbo]@2hostsselectuser_id, usename, nickname, password, user_group_id, realname, gender, email, mobilephone, birthday, province_id, city_id, district_id, marry, income, remarks, create_datetime, active_state, verityEmail, verityPhone, credit, last_login, last_ip, is_locked, channel, tag, union_partner_uuid, union_user_safekey, is_black, qq, weibo_id, verity_email_key, verity_phone_key, verity_email_datetime, verity_phone_datetime, verity_question, verity_answer, cps_code, cps_time_from, cps_time_to, cps_cookie, first_channelfrom user_info where mobilephone = 'S' and (channel is null or trim(channel) ='S')