No more optimization rules: LLM-enabled policy-based multi-modal query optimizer (version 1)

要約

大規模言語モデル (LLM) は、機械学習と深層学習の分野において極めて重要な瞬間を迎えました。
最近では、シングルモーダル クエリとマルチモーダル クエリの両方を含むクエリ プランニングの機能が調査されています。
ただし、LLM のクエリ最適化機能については何も取り組んでいません。
クエリ プランの実行パフォーマンスに大きな影響を与える重要な (または最も重要な) ステップとして、このような分析と試行は見逃すべきではありません。
別の側面から見ると、既存のクエリ オプティマイザーは通常、ルール ベース、またはルール ベース + コスト ベースです。つまり、クエリ プランの書き換え/変換を完了するために手動で作成されたルールに依存します。
最新のオプティマイザーには数百から数千のルールが含まれているという事実を考慮すると、同様の方法に従ってマルチモーダル クエリ オプティマイザーを設計すると、できるだけ多くのマルチモーダル最適化ルールを列挙する必要があるため、非常に時間がかかりますが、これは十分ではありませんでした。
今日取り上げた。
この論文では、LLM のクエリ最適化能力を調査し、LLM を使用して、新しい LLM およびポリシー ベースのマルチモーダル クエリ オプティマイザーである LaPuda を設計します。
LaPuda では、特定の詳細なルールを列挙する代わりに、LLM の最適化をガイドするための抽象的なポリシーをいくつか必要とするだけで、多くの時間と人的労力が節約されます。
さらに、LLM による間違いやマイナスの最適化を防ぐために、勾配降下の考え方を借用し、最適化を正しい方向に保つことができるように、最適化を実行するためのガイド付きコスト降下法 (GCD) アルゴリズムを提案します。
私たちの評価では、ほとんどの場合、私たちの手法は一貫してベースラインを上回っています。
たとえば、私たちの方法によって生成された最適化されたプランは、ベースラインによるものよりも 1 ~ 3 倍高い実行速度をもたらします。

要約(オリジナル)

Large language model (LLM) has marked a pivotal moment in the field of machine learning and deep learning. Recently its capability for query planning has been investigated, including both single-modal and multi-modal queries. However, there is no work on the query optimization capability of LLM. As a critical (or could even be the most important) step that significantly impacts the execution performance of the query plan, such analysis and attempts should not be missed. From another aspect, existing query optimizers are usually rule-based or rule-based + cost-based, i.e., they are dependent on manually created rules to complete the query plan rewrite/transformation. Given the fact that modern optimizers include hundreds to thousands of rules, designing a multi-modal query optimizer following a similar way is significantly time-consuming since we will have to enumerate as many multi-modal optimization rules as possible, which has not been well addressed today. In this paper, we investigate the query optimization ability of LLM and use LLM to design LaPuda, a novel LLM and Policy based multi-modal query optimizer. Instead of enumerating specific and detailed rules, LaPuda only needs a few abstract policies to guide LLM in the optimization, by which much time and human effort are saved. Furthermore, to prevent LLM from making mistakes or negative optimization, we borrow the idea of gradient descent and propose a guided cost descent (GCD) algorithm to perform the optimization, such that the optimization can be kept in the correct direction. In our evaluation, our methods consistently outperform the baselines in most cases. For example, the optimized plans generated by our methods result in 1~3x higher execution speed than those by the baselines.

arxiv情報

著者 Yifan Wang,Haodi Ma,Daisy Zhe Wang
発行日 2024-03-20 13:44:30+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.DB, cs.IR パーマリンク