Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The optimizer doesn't use partition metadata, e.g.,
select max(dt) from big_partitioned_table;
Instead of just returning the biggest date in the table, it runs a full table scan. This kind of expression can also be useful in more interesting cases like:
select count from big_partitioned_table a join (select max(dt) m from big_partitioned_table) b on a.dt=b.m;