Amazon Athena adds cost-based optimizer to enhance query performance

Starting today, Amazon Athena uses cost-based optimizer (CBO) to enhance query performance based on table and column statistics, collected by AWS Glue Data Catalog. With CBO, Athena analyzes and selects query plan optimizations, such as reordering joins or moving aggregations to earlier in the plan, that improve performance without requiring changes in your SQL code.

Source:: Amazon AWS