sql 建立索引之前计算区分度

select cutomer_id,title,content from product_comment where audit_status=1 and product_id=1 and product_id=199726 limit 0,5

select count(DISTINCT audit_status)/COUNT(*) AS audit_rate COUNT(DISTINCT product_id)/COUNT(*) AS product_rate FROM product_comment

原文地址:https://www.cnblogs.com/alter888/p/10590104.html