Tips to optimize BigQuery using partitioned and clustered tables
BigQuery tables can store data from zero bytes to petabytes of data. There is no difference between creating a small-sized table or a large-sized table. To simplify the context and for illustration purposes only, let’s say a small-sized table ranges from KBs to 100 GB. The large-sized tables range from 100 GB to PB of data. Technically, both tables are the same, but if you think about optimizing performance and compute cost, you can configure the tables using two features called BigQuery partitioned tables and BigQuery clustered tables.
These features are helpful for both on-demand and flat-rate pricing. In on-demand pricing, the features will cut the billed bytes and will reduce the overall cost that is calculated from the billed bytes. With flat-rate pricing, it doesn’t affect the cost directly. Remember that the cost of flat-rate pricing is flat per period. However, when you’re using features...