Analyze BigQuery table storage using INFORMATION_SCHEMA.TABLE_STORAGE
0 tables analyzed
Total Tables
-
Logical Storage
-
Physical Storage
-
Potential Savings
-
Table Storage Details
Project
Dataset
Table
Logical (GB)
Physical (GB)
Time Travel (GB)
Logical Cost/Mo
Physical Cost/Mo
Potential Savings
Recommended Model
Efficiency
Run table storage analysis to see detailed storage breakdown
๐ฐ BigQuery Cost Predictor
Predict query costs BEFORE execution to prevent bill shock
๐ We will build model for you and predict based on BOOSTED_TREE_REGRESSOR
The first time will take ~ 16 minutes you we want to provide Accurate cost
Our main Goal is to give any company to predict query cost
So we need to use project as parameter that change based on company
โ๐ค BOOSTED_TREE_REGRESSOR REQUIRED
Only trained ML models provide accurate predictions (95% accuracy)
โ ๏ธ No fallback predictions - Train your model first!
๐ Setup Custom BOOSTED_TREE_REGRESSOR Model
๐ฏ The General Process
This is the general process we will implement for your company to predict query costs with high accuracy using machine learning.
PART 1:Create training table `{project}.Finops.train`
PART 2:BOOSTED_TREE_REGRESSOR model creation
PART 3:PREDICTION using the trained model
We need to use project as parameter that changes based on company
1
PART 1: CREATE TABLE `{project}.Finops.train`
Extract historical query data from INFORMATION_SCHEMA
CREATE TABLE `{project}.Finops.train` AS
SELECT
query,
total_slot_ms / 3600000 as slots_hours -- Convert to hours
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE creation_time >= '2024-01-01'
AND job_type = 'QUERY'
AND state = 'DONE'
AND total_slot_ms > 0
2
PART 2: BOOSTED_TREE_REGRESSOR
Create ML model (~16 minutes training time)
CREATE OR REPLACE MODEL `{project}.Finops.slots_prediction_model`
OPTIONS(
model_type='BOOSTED_TREE_REGRESSOR',
input_label_cols=['slots_hours']
) AS
SELECT
query,
slots_hours
FROM `{project}.Finops.train`
3
PART 3: PREDICTION
Use trained model to predict query costs
SELECT predicted_slots_hours
FROM ML.PREDICT(
MODEL `{project}.Finops.slots_prediction_model`,
(SELECT 'YOUR_QUERY_HERE' as query)
)
โ Ready to Use!
Once the model is trained, you can predict costs for any query before execution using the UI below.
Model Training Progress
๐ก Regional Pricing Tip
Select where your query will run. Cross-region queries can cost 25x more due to data transfer fees ($120/TB)!
๐ Cost Analysis
Data to Scan
-
Estimated Cost
-
๐TESTruns/week
Execution Time
-
Query Region
-
-
โ ๏ธ Risk Factors
๐ก Recommendations
๐ Sample Queries
Analyzing query cost...
โก BigQuery Query Executor
Execute any BigQuery query - works exactly like your test app
Executing query...
๐ Analysis Results
BigQuery Query:
SELECT * FROM INFORMATION_SCHEMA.JOBS_BY_PROJECT LIMIT 10;
๐ Cost Summary by Region
Region
Cost
Slots
Run analysis to see regional breakdown
๐ฐ Discover Your Most Expensive Users and Queries
Discover which users and queries are costing you the most money. This helps you optimize your BigQuery usage and reduce costs!