.[Vani 发表于 2013-4-8 16:22:44

mysql 请问如何优化?

本帖最后由 .

SELECT COUNT(DISTINCT c.uc_id),b.industry_level_3FROM 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
    idselect_typetable   type    possible_keys      key                  key_lenref                        rowsExtra                                       
---------------------------------------------------------------------------------------------------------------------------------------------------
   1SIMPLE       a       ref   PRIMARY            PRIMARY            4      const                         2Using index; Using temporary; Using filesort
   1SIMPLE       f       const   PRIMARY,account_id   PRIMARY            4      const                         1                                             
   1SIMPLE       g       ref   PRIMARY            PRIMARY            4      244_shendu.f.user_id          7Using index                                 
   1SIMPLE       b       eq_refPRIMARY            PRIMARY            4      244_shendu.g.product_id       1                                             
   1SIMPLE       c       ref   idx_fact_product_ididx_fact_product_id4      244_shendu.b.product_id   297Using index                                 
   1SIMPLE       d       ref   PRIMARY            PRIMARY            4      244_shendu.c.uc_id            1Using index                                 
   1SIMPLE       e       eq_refPRIMARY            PRIMARY            4      244_shendu.d.risk_id          1Using index                                 

左耳边的期盼 发表于 2016-1-25 15:58:30

癫痫的急救措施是什么 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
页: [1]
查看完整版本: mysql 请问如何优化?