Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it more cost-effective to use views in BigQuery instead of simple SQL?

You pay per size of data queried. So, would be a better alternative to use views from the cost point of view?

like image 238
Alexandru R Avatar asked Sep 18 '25 18:09

Alexandru R


1 Answers

Views are not materialized in bigquery (currently), so the cost of querying from a view is identical to writing the more complex query on the underlying table.

You can, of course, create your own "materialized views" by running a query and saving it as a table. Then you can run subsequent queries against that table. This may be more cost effective if the saved table is smaller than the underlying table. That takes a bit more manual bookkeeping, however.

like image 177
Jordan Tigani Avatar answered Sep 23 '25 12:09

Jordan Tigani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!