Alibabacloud, Database, Query Optimization, Sql, Relational Databases.
since the scanned rows in the subquery and each row of the external query assigned to the subquery do not overlap. Besides, the results of min function in the subquery for the same external rows are the same. So, early agg can be applied for further optimization. For SQL2, semantically, all rows in