Skip to main content
QUICK REVIEW

[論文レビュー] FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation.

Rong Zhu, Zi‐Niu Wu|arXiv (Cornell University)|Jan 1, 2020
Data Management and Algorithms参考文献 43被引用数 2
ひとこと要約

FLATは、属性相関を適応的にモデル化できる新規の教師なしグラフィカルモデルFSPNを用いた、高速で軽量かつ高精度な基数推定手法である。独立および条件付き因子分解を組み合わせることで、近線形時間の確率計算を可能にし、ストレージを1〜2桁減少させ、従来手法と比較して1〜5桁の精度向上を達成。Postgresではベースラインと比較して12.9%高速なクエリ実行を実現した。

ABSTRACT

Query optimizers rely on accurate cardinality estimation (CardEst) to produce good execution plans. The core problem of CardEst is how to model the rich joint distribution of attributes in an accurate and compact manner. Despite decades of research, existing methods either over simplify the models only using independent factorization which leads to inaccurate estimates, or over complicate them by lossless conditional factorization without any independent assumption which results in slow probability computation. In this paper, we propose FLAT, a CardEst method that is simultaneously fast in probability computation, lightweight in model size and accurate in estimation quality. The key idea of FLAT is a novel unsupervised graphical model, called FSPN. It utilizes both independent and conditional factorization to adaptively model different levels of attributes correlations, and thus dovetails their advantages. FLAT supports efficient online probability computation in near liner time on the underlying FSPN model, provides effective offline model construction and enables incremental model updates. It can estimate cardinality for both single table queries and multi table join queries. Extensive experimental study demonstrates the superiority of FLAT over existing CardEst methods on well known IMDB benchmarks: FLAT achieves 1 to 5 orders of magnitude better accuracy, 1 to 3 orders of magnitude faster probability computation speed and 1 to 2 orders of magnitude lower storage cost. We also integrate FLAT into Postgres to perform an end to end test. It improves the query execution time by 12.9% on the benchmark workload, which is very close to the optimal result 14.2% using the true cardinality.

研究の動機と目的

  • 基数推定におけるモデルの精度、計算速度、ストレージコストのトレードオフを解決すること。
  • 単に独立性または損失なしの条件付き因子分解に依存せず、複雑な属性相関を効率的にモデル化する手法を開発すること。
  • 動的データベースに適応するため、オンライン確率計算とインクリメンタルなモデル更新を可能にすること。
  • 単一テーブルおよび複数テーブル結合クエリの両方を高精度に推定できること。
  • 実際のデータベースシステムに統合され、エンドツーエンドの性能向上を示すこと。

提案手法

  • FLATは、FSPNと呼ばれる新規の教師なしグラフィカルモデルを導入し、独立および条件付き因子分解を組み合わせることで、多様な属性相関レベルを適応的に捉える。
  • 弱い相関を持つ属性には独立因子分解、強い相関を持つ属性には条件付き因子分解を適用するハイブリッド因子分解戦略を採用し、精度と効率のバランスを図る。
  • FSPN構造上で最適化された推論アルゴリズムを用いることで、近線形時間の確率計算を実現する。
  • データベース統計を用いた教師なし学習により、オフラインでのモデル構築を効率的に行う。
  • 完全な再トレーニングなしにスキーマやデータの変更に適応できるインクリメンタルな更新をサポートする。
  • 実証的な導入を目的として、Postgresに統合してエンドツーエンドの評価を実施し、実用的導入の可能性を示した。

実験結果

リサーチクエスチョン

  • RQ1独立および条件付き因子分解を組み合わせたハイブリッド因子分解モデルは、純粋に独立または完全に条件付きのモデルよりも高い精度を達成できるか?
  • RQ2このようなモデルは、ストレージオーバーヘッドを低減しつつ、高速な確率計算を維持できるか?
  • RQ3多様なクエリワークロードにおいて、精度、速度、メモリ使用量の面でどのようにスケーリングするか?
  • RQ4Postgresのような実際のDBMSに統合された場合、FLATはクエリ実行時間をどの程度改善できるか?
  • RQ5最適化品質の観点から、真値の基数と比較して、FLATはどの程度優れているか?

主な発見

  • IMDBベンチマークにおいて、従来手法と比較してFLATは1〜5桁の高い基数推定精度を達成した。
  • 先行手法と比較して、確率計算時間を1〜3桁短縮した。
  • ストレージコストは1〜2桁削減され、モデルは軽量であることが確認された。
  • Postgresに統合された場合、FLATはクエリ実行時間を12.9%高速化し、真値基数を用いた最適な14.2%に近く達した。
  • 単一テーブルおよび複数テーブル結合クエリの両方で一貫した性能向上を示した。
  • インクリメンタルな更新により、再トレーニングを再開することなく、データおよびスキーマの変更に効率的に適応できる。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。