Google made History Based Optimization general available for BigQuery
Enable, disable, and analyze History based Optimizations for Queries
Google just announced that you can now enable, disable, and analyze history-based optimizations for queries[1].
The feature was already in preview this year but now it’s general available — so it’s usable within a productive environment.
The new feature makes query optimization very easy because you just have to enable it, the rest is done by Google. To use history-based optimizations in a project, include the following parameter in the ALTER PROJECT
statement: default_query_optimizer_options = 'adaptive=on'
[2]:
Query example to enable the feature:
ALTER PROJECT `user_project`
SET OPTIONS (
`region-us.default_query_optimizer_options` = 'adaptive=on'
);
History-based optimizations use information from already completed executions of similar queries to apply additional optimizations and further improve query performance such…