Range Partitioning

  • Partitions data based on ranges of a key column (e.g., dates, IDs)
  • Excellent for time-series data where newer data is accessed more frequently
  • Example: Monthly partitions for transaction data (Jan 2025, Feb 2025, etc.)

List Partitioning

  • Assigns rows to partitions based on discrete values in a column
  • Good for categorical data with a known set of values
  • Example: Partitioning sales data by country or region code

Hash Partitioning

  • Uses a hash function on the partition key to determine partition placement
  • Distributes data evenly across partitions
  • Ideal when there’s no natural range or list partitioning strategy

Composite Partitioning

  • Combines multiple partitioning methods (e.g., range-hash, list-hash)
  • Provides more granular control over data distribution
  • Example: First partition by date range, then hash by customer ID