select id,(select sum(test_field
) from test2 where test_id = test2_id) as total from test order by total limit 5
类似这样的sql 会导致过慢 有什么解决的方案吗
select id,(select sum(test_field
) from test2 where test_id = test2_id) as total from test order by total limit 5
类似这样的sql 会导致过慢 有什么解决的方案吗
9 回答1.6k 阅读
3 回答1.3k 阅读✓ 已解决
3 回答672 阅读✓ 已解决
2 回答938 阅读✓ 已解决
5 回答1.1k 阅读
3 回答546 阅读✓ 已解决
1.1k 阅读✓ 已解决
你这个查询一共就一条数据为什么还要用子查询,还要 order by?