直方图优化案例
##
直方图优化案例
来自互联网的案例
1、优化器查询时间
mysql > SELECT COUNT(*) FROM goods_shops JOIN goods_characteristics USING (good_id)
-> WHERE size IN ('Lenovo', 'Dell', 'Toshiba', 'Samsung', 'Acer')
-> AND (location IN ('Moscow', 'Kiev')
-> OR delivery_options IN ('Premium', 'Urgent'));
+----------+
| COUNT(*) |
+----------+
| 816640 |
+----------+
1 row in set (11 min 34.85 sec)