0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

パーティショニング・ZORDER BY・Liquid Clusteringメモ

Posted at

戦略ごとの特徴と適用条件

戦略 最適なケース 特徴
パーティショニング クエリのフィルター列が安定・予測可能(例:event_date データを物理的に分割し、スキャン対象を大幅に減らせる。ただし過剰パーティションは小ファイル問題を招く。
ZORDER BY 高カーディナリティ列で一貫したフィルタ(例:customer_idproduct_sku 同一ファイル内に関連データを集めることで I/O 削減。静的で事前に決め打ちする必要あり。
Liquid Clustering(自動) フィルター列やパターンが頻繁に変わる/予測不能 最新のクエリワークロードを解析し、複数列を横断的に自動クラスタリング。手動チューニング不要。

Liquid Clustering の強み

  • 適応性:クエリパターンが変わっても自動で再配置
  • 複数列対応:同時に複数の列フィルタに最適化
  • メンテナンスフリー:ZORDER のように手動実行不要
  • 予測不能パターンに有効:分析用途や探索的クエリで効果的

使い分けのざっくり判断

  1. 日付や時間など固定の列でよく絞り込むパーティショニング
  2. 一部の高カーディナリティ列で絞るのがほぼ決まっているZORDER
  3. 誰がどんなフィルターを使うかわからない分析基盤Liquid Clustering

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?