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!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

AWS GenAI Live!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️