<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anurag on Medium]]></title>
        <description><![CDATA[Stories by Anurag on Medium]]></description>
        <link>https://medium.com/@budmeanurag?source=rss-5907a542bdc9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*L9cffSR_CqpDOdjq.jpg</url>
            <title>Stories by Anurag on Medium</title>
            <link>https://medium.com/@budmeanurag?source=rss-5907a542bdc9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:06:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@budmeanurag/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[BigQuery Cost Optimization and Best Practices]]></title>
            <link>https://budmeanurag.medium.com/bigquery-cost-optimization-and-best-practices-a083822b2e9e?source=rss-5907a542bdc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a083822b2e9e</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[data-warehousing]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[analytics-platforms]]></category>
            <dc:creator><![CDATA[Anurag]]></dc:creator>
            <pubDate>Mon, 30 Dec 2024 04:39:22 GMT</pubDate>
            <atom:updated>2024-12-30T04:39:22.516Z</atom:updated>
            <content:encoded><![CDATA[<p>BigQuery is one of the most popular service in GCP ecosystem for end to end use cases starting with Data ingestion to utilization of ML models.</p><p>As teams with diverse background utilize this service, it is important to have frequent monitoring on BigQuery costs and optimize the workloads. This exercise helps in optimizing workloads and sudden surprise with the billing amounts.</p><p>Here are the top optimizations and best practices one can utilize in optimization of BigQuery workloads and BigQuery costs</p><ol><li>Avoid SELECT * FROM &lt;project_id&gt;.&lt;dataset_id&gt;.&lt;table_id&gt; in your queries. BigQuery uses columnar storage. Selection of columns in the query reduces the amount of data scanned which decreases the costs.</li><li>Partitioning: Partition stores the data in different blocks or partitions physcially depending upon ingestion time or the partition columns configured. When the user query the partitioned table with the partitioned filter, only the partitioned data would be considered instead of complete table.</li><li>Clustering: It helps in ordering data within partition. Clustering helps in increasing the performance and query scanning. Clustering columns will be depending upon the consumption pattern which includes the most commonly used fields.</li><li>Estimate costs before query execution: BigQuery console shows the amount of data being processed when you select the query. This number is an estimate and can be differ on the tables having partioned and clustering.</li><li>Run Queries with sample data: Use functions TABLESAMPLE SYSTEM (1 PERCENT) to reduce the amount of data scanned. This function helps as part of exploratory analysis by data analysts and data scientists.</li><li>Utilize Temp Tables: BigQuery stores the query output for 24 hour in temporary tables. Queries on temporary tables are free of cost unlike querying the original tables.</li><li>Identify data storage requirements: BigQuery has physical and logical storage billing model. Physical storage involves the compressed data and historical snapshots related to time travel which is configured to seven days by default. For non-critical datasets, decrease the time travel period which reduces the physical storage costs.</li><li>Reduce the data to be joined. Filter the data in the initial phases before joining. When joining multiple tables, decrease in table size and joining on column type INT64 is preferred.</li></ol><p><em>Disclaimer: The opinions and views expressed in my articles on Medium.com are my own, and do not reflect those of my employer.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a083822b2e9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>