DEV Community

Cover image for How to reuse BigQuery cached results
Marcelo Costa
Marcelo Costa

Posted on

How to reuse BigQuery cached results

When it comes to using Google BigQuery for data analysis, cost-effectiveness is a key concern. While BigQuery itself offers an affordable solution, the real challenge lies in optimising your queries to avoid skyrocketing expenses.

By leveraging the nature of temporarily created tables in BigQuery, you can seamlessly integrate them into subsequent queries, saving costs!

When you run a query, a temporary, cached results table is created in a special dataset referred to as an "anonymous dataset". docs

In Short, BigQuery will create a temporary table for each query you run:
Temp Table

It can be accessed on subsequent queries and will exist for 24 hours:

Cached Results

So whenever you are a processing a big chunk of data, keep in mind that this strategy can help you run tests, analysis and even connect it to Looker, happy costs saving!

Top comments (0)