Bigquery, Execution Plan, Query Optimization.
user_id = u.id ORDER BY comments_count DESC; Image by the author Image by the author Total elapse time reduced to 10 sec. Stage 00 that reads data from comments table now reduces the written data from 86.75M to 12.62M records. It is because workers performs partial aggregation right at the leaf