EC SQL占用大量CPU资源,I/O RAM都不占
2016-07-07 15:18 来源:www.chinab4c.com 作者:ecshop专家
EC SQL占用大量CPU资源,I/O RAM都不占,过滤慢查询语句,发现语句都是一样的,如下,有谁能告诉我怎么优化莫,索引都是官网SQL默认的几个BTREE索引.dbuser是数据库用户,ecshopdb是数据库名。 # User@Host: dbuser[dbuser] @[10.0.0.100] # Query_time: 13Lock_time: 2Rows_sent: 7Rows_examined: 170874 SELECT g.goods_id, g.goods_name, g.shop_price, g.goods_thumb, SUM(og.goods_number) as goods_number FROM `ecshopdb`.`d_goods` AS g, `ecshopdb`.`d_order_info` AS o, `ecshopdb`.`d_order_goods` AS og WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0AND o.order_sn >= '20100809'AND g.goods_number > 0AND og.order_id = o.order_id AND og.goods_id = g.goods_id AND o.order_status = '1' AND (o.pay_status = '2' OR o.pay_status = '1') AND (o.shipping_status = '1' OR o.shipping_status = '2') GROUP BY g.goods_id ORDER BY goods_number DESC, g.goods_id DESC LIMIT 7; |
回答:
进程出现大量copy to tmp table 导致很多Locked,有没有人可以帮看看,如果建立优化索引,谢谢 |
最近更新
常用插件
- ecshop按分类筛选销售排行
ecshop按分类筛选销售排行...
- ecshop供应商插件免费下载
ecshop供应商插件免费下载...
- ecshop二次开发售后维修卡
插件介绍: 本插件是用于专门从事电子,信息,软件等售后服务关键比...
- ecshop选择下单时间插件
ecshop选择下单时间插件主要是根据不同的下单配送要求,在ecshop购物车...
- ecshop快递发货单打印商品
ecshop快递发货单打印商品信息,大家都知道ecshop快递单打印的时候,只能...
ecshop热门问答
ecshop热门资料
ecshop程序安装
ecshop显示数量
ecshopphpincludes
ecshop百科
ecshop油滑
ecshop会员进销存
ecshopECSEOP
ecshopBOOK
ecshop站长
ecshop分类树
ecshop有效
ecshop小动作
ecshopexshop
ecshop后台管理
ecshop330
ecshop折叠式
ecshop老板
ecshop首页
ecshop密码
ecshop数据表前缀
ecshop上市
ecshop版本
ecshop测试结果
ecshopGAMES
ecshopphpmyadmin
ecshop官方下载
ecshop不负责任
ecshopcsv文档
ecshop求网站修改战略
ecshop一不小心