Analytic Platform Query Plan Tuning With Domain-Specific LLMs
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing AI-driven database tuning solutions lack specificity and accuracy due to the need for domain-specific training data, leading to suboptimal query performance without manual intervention.
Innovation Solution
A system utilizing a custom large language model (LLM) trained on domain-specific data from in-house performance benchmarks and production workloads to generate recommended actions for query plan optimization, leveraging fine-tuned prompt templates for natural language query analysis.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If traditional LLMs are used for database tuning, then automation is provided, but accuracy and reliability of database analysis deteriorates
Solution Approach 1:
The system performs preliminary actions by curating and preparing domain-specific training data from performance benchmarks and production workloads before deploying the LLM for automated database tuning. This pre-training with specialized data ensures the model has the necessary knowledge base before automation begins, resolving the contradiction between automation and accuracy.
Solution Approach 2:
The system changes the parameters of the LLM by fine-tuning it with domain-specific training data, transforming a general-purpose model into a specialized database tuning expert. This parameter adjustment through training enables the model to maintain high accuracy while providing full automation capabilities.
2Reliability
If LLM is trained with domain-specific data to improve accuracy, then manufacturing complexity increases
Solution Approach 1:
The system achieves universality by using a single LLM model that can handle multiple database tuning tasks across different scenarios. The model is trained on diverse domain-specific data from performance benchmarks and production workloads, enabling it to generalize across various query optimization problems without requiring separate specialized models for each task.
Solution Approach 2:
The system implements self-service by automatically curating training data from performance benchmarks and production workloads without requiring extensive manual intervention. The automated data collection and preparation processes reduce the complexity burden, allowing the system to maintain high accuracy while minimizing manual effort in the training pipeline.
3Manufacturing precision
If manual tuning is performed to achieve accurate query optimization, then productivity decreases
Solution Approach 1:
The system replaces the mechanical process of manual database tuning with an AI-based LLM system. The LLM analyzes query plans and provides optimization recommendations automatically, substituting human experts' manual analysis with an automated intelligent system that maintains high optimization quality while dramatically improving productivity and reducing tuning time.
Data Source
AI summary
A system may include a plurality of processing nodes in communication with a storage device configured to store a plurality of data. The processing nodes may receive a query on at least a portion of the data and may generate a query plan in natural language format. The processing nodes may generate a large language model (“LLM”) input based on the natural language format of the query plan and may execute an LLM on the LLM input. The processing nodes may generate, in response to execution of the LLM, a plurality of recommended actions to perform to improve the query plan. The processing nodes may receive input to execute at least one of the plurality of recommended actions and may alter the query plan in accordance with the at least one of the plurality of recommended actions. A method and computer-readable medium are also disclosed.


