Patent attributes
A disclosed database system and enhanced methods implement enhanced mini-plans and dynamically changing a query mini-plan with trustworthy Artificial Intelligence (AI) to improve query execution performance in a database system. An AI cost model evaluates candidate mini-plans for executing a query. AI truth monitors evaluate the execution of the mini-plans, such as predicted input factors and adjusted mini-plans of one or more AI running data models. The AI truth monitors provide feedback to adjust the AI cost model based on evaluating the execution of the mini-plans. The AI truth monitors validate adjusted mini-plans, provide feedback to the AI cost model with improved overall prediction accuracy, and enhanced mini-plans to gain query performance.