# 3.1.2 - Partitioning and Clustering

:clock4:  *Estimated time spent on this lesson | \~15 min*

Youtube Video | \~8 min

{% embed url="<https://www.youtube.com/watch?v=-CqXf7vhhDs&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=28>" %}
<https://www.youtube.com/watch?v=-CqXf7vhhDs&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=28>
{% endembed %}

:writing\_hand: In this video we will learn more about partitioning and clustering and when to use one over the other.&#x20;

:grey\_exclamation:You can cluster for up to 4 fields! Also, you will likely only want to do partitioning and clustering if data size is larger than 1 GB, otherwise it may actually be more costly and won't save time. <mark style="background-color:blue;">BigQuery</mark> automatically reclusters the table as new data comes in.

If you use SQL server, here are some helpful resources

:books: MS SQL Server info&#x20;

{% embed url="<https://learn.microsoft.com/en-us/sql/relational-databases/partitions/partitioned-tables-and-indexes?view=sql-server-ver16>" %}
<https://learn.microsoft.com/en-us/sql/relational-databases/partitions/partitioned-tables-and-indexes?view=sql-server-ver16>
{% endembed %}

:vhs: <https://www.youtube.com/watch?v=Rxu3IenrMBI>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://data-engineering-zoomcamp-2025-t.gitbook.io/tinker0425/module-3/3.1-data-warehouse-partitioning-and-clustering/3.1.2-partitioning-and-clustering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
