Strategies for optimizing your BigQuery queries

preview_player
Показать описание

Did you know that optimizing SQL queries can be cost efficient? In this episode of BigQuery Spotlight, we speak to some strategies for optimizing your BigQuery queries. We’ll walk through what happens behind the scenes for more complex queries, and show you specific tactics you can use to optimize your SQL. Watch to learn some great techniques on how to make your queries more performant!

Timestamps:
0:00 - Intro
0:55 - Necessary columns only
1:26 - Prune data with partitions and clusters
1:54 - Aggregations in BigQuery
2:52 - Late aggregation
3:19 - Nest repeated data
4:00 - Shuffle Joins in BigQuery
4:27 - Broadcast Joins in BigQuery
4:55 - JOIN order
5:03 - Filter before joins
5:25 - Cluster on join keys
5:48 - WHERE clause order matters
6:03 - ORDER BY with LIMIT
6:35 - Wrap up

#BigQuerySpotlight

product: Cloud - Data Analytics - BigQuery; fullname: Leigha Jarett;
Рекомендации по теме
Комментарии
Автор

Perfect and easy examples to describe the impact of optimization.

premmohantyagi
Автор

This is the simply most important video to watch by the users of BigQuery 🔥

AlesNajmann
Автор

great video i thought it gonna be light but is very deep in knowledge

divertechnology
Автор

thanks for the great explanation. I like "stay curious"! :)

xiaoyangshawnhuang
Автор

5:50
Does the common practice of putting WHERE 1=1 as the first expression has any affect on this?

SasawatChanate
Автор

Nice one! At how much data processing do you recommend to start working on optimizing the queries? As in when will the effect really start to show an impact? 1gb of processing, 10, 1000 or 1tb?

michelkant
Автор

At 5:25, why does clustering based on common join keys improve the efficiency more than partitioning?

jackylee
Автор

How do you know the "where" clause is performed before the join (5:17) ? Don't you have to do a sub query on the left joined (t2) table ? (also does this sub query be less performant ?)

majorcemp
Автор

really curious why such simple examples can not be automatically handled by query optimizer (which is already done by other databases)

Alex
Автор

is the concept can also be applied to other SQL databases?

jaysyanshar
Автор

Google Google many businesses are always liked by people all over the world Thank you Google

gangsterrapmix