我在试图优化的 Mysql 脚本中遇到了这行代码(该脚本需要 7 多个小时才能运行)。我发现这条线占了执行时间的 60% 以上。
# #Fill temp table
SELECT
DISTINCT clv_temp(view01.user_email,,user_number) AS `Authentic`
FROM(
SELECT DISTINCT u_mail, u_phone
FROM
Cust_orders
ORDER BY order_date ASC
)view01;