DISTINCT removal in aggregate functions
Basics
SELECT COUNT(DISTINCT col1) FROM tbl1;When one can skip de-duplication
SELECT aggregate_func(DISTINCT tbl.primary_key, ...) FROM tbl;SELECT aggregate_func(DISTINCT t1.pk1, ...) FROM t1 GROUP BY t1.pk2;Observability
Last updated
Was this helpful?

