Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个大约有 45,000,000 行的表,该表有 msisdn 字段、sub_type 字段和运行日期
我写了这个查询:
SELECT COUNT(*), MSISDN, SUB_TYPE FROM <table> GROUP BY SUB_TYPE, MSISDN HAVING COUNT(*) > 1 ORDER BY MSISDN ASC;
加载时间过长。
有没有更好的写法?
请提出您的建议。
谢谢,安居