Google made History Based Optimization general available for BigQuery

Enable, disable, and analyze History based Optimizations for Queries

Christianlauer
CodeX

--

Photo by Jasper Gribble on Unsplash

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

--

--

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Christianlauer
Christianlauer

Written by Christianlauer

Big Data Enthusiast based in Hamburg and Kiel. Thankful if you would support my writing via: https://christianlauer90.medium.com/membership

No responses yet