哪种是在PHP / MySQL中使用查询的性能最佳方式?
1.Sub查询:
SELECT column1, (sub-query) as column2 FROM join_multiple_tables WHERE some condition GROUP BY columns
2.多个查询:
SELECT column1 FROM join_multiple_tables WHERE some condition GROUP BY columns
然后使用PHP基于第1列值执行多个查询。那么哪种方法可以降低执行成本?