我有一个 MySQL 查询,用于显示应用程序列表页面中的数据计数。
询问
SELECT COUNT(*) FROM cnitranr left join cnitrand on cnitrand.tx_no=cnitranr.tx_no
解释截图
cnitranr 上的索引
tx_no (primary )approx 1 crore of data[ENGINE MYISAM]
cnitrand指数
(tx_no secondary)approx 2 crore of data[ENGINE MYISAM]
Profiler 输出是这样的
任何人都可以建议优化此查询的可能性,或者我想运行一个cron作业来计算计数。请帮忙。