MariaDB社区

标题: mysql 请问如何优化? [打印本页]

作者: .[Vani    时间: 2013-4-8 16:22
标题: mysql 请问如何优化?
本帖最后由 .[Vani 于 2013-4-8 17:06 编辑

SELECT COUNT(DISTINCT c.uc_id),b.industry_level_3  FROM sys_account_industry a
LEFT JOIN sys_account f ON f.account_id = a.account_id
LEFT JOIN sys_user_product_region g ON g.user_id = f.user_id
LEFT JOIN dim_product b ON g.product_id = b.product_id
LEFT JOIN fact_information c ON c.product_id = b.product_id
LEFT JOIN fact_bridge_info_risk d ON d.uc_id = c.uc_id
LEFT JOIN dim_risk e ON e.risk_id = d.risk_id
/*WHERE a.account_id = ?  AND a.type = ? "+condition+*/
GROUP BY b.industry_level_3

  1.     id  select_type  table   type    possible_keys        key                  key_len  ref                        rows  Extra                                       
  2. ------  -----------  ------  ------  -------------------  -------------------  -------  -----------------------  ------  --------------------------------------------
  3.      1  SIMPLE       a       ref     PRIMARY              PRIMARY              4        const                         2  Using index; Using temporary; Using filesort
  4.      1  SIMPLE       f       const   PRIMARY,account_id   PRIMARY              4        const                         1                                             
  5.      1  SIMPLE       g       ref     PRIMARY              PRIMARY              4        244_shendu.f.user_id          7  Using index                                 
  6.      1  SIMPLE       b       eq_ref  PRIMARY              PRIMARY              4        244_shendu.g.product_id       1                                             
  7.      1  SIMPLE       c       ref     idx_fact_product_id  idx_fact_product_id  4        244_shendu.b.product_id     297  Using index                                 
  8.      1  SIMPLE       d       ref     PRIMARY              PRIMARY              4        244_shendu.c.uc_id            1  Using index                                 
  9.      1  SIMPLE       e       eq_ref  PRIMARY              PRIMARY              4        244_shendu.d.risk_id          1  Using index                                 
复制代码

作者: 左耳边的期盼    时间: 2016-1-25 15:58
癫痫的急救措施是什么 http://jiankang.zkxww.com/dxbdyf/10970319082.html
癫痫的护理要有针对性 http://jiankang.zkxww.com/dxbdyf/10970319422.html
癫痫的症状及表现 http://jiankang.zkxww.com/dxbdyf/10970319516.html
了解小儿癫痫早期症状很重要 http://jkbk.thmz.com/etdxb/10970283794.html
癫痫病专家告诉您为何会患癫痫病 http://jkbk.thmz.com/dxbby/10970283964.html
儿童癫痫患者饮食禁忌有哪些? http://jkbk.thmz.com/ddbc/10970284039.html
了解常见的儿童癫痫病发作症状,家长不可忽视 http://jkbk.thmz.com/etdxb/10970284130.html
癫痫病人可以服用补药吗 http://jkbk.thmz.com/zysm/10970284205.html
癫痫病为何常常发作,专家为您讲解! http://jkbk.thmz.com/dxbby/10970284344.html
儿童癫痫病人的饮食禁忌介绍 http://jkbk.thmz.com/ddbc/10970284576.html





欢迎光临 MariaDB社区 (http://123.56.88.72/) Powered by Discuz! X3.2