标题: 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
id select_type table type possible_keys key key_len ref rows Extra