This topic describes an overview of performance optimization on slow or resource-consuming queries based on query analysis. For more information, see Overview. You can optimize query performance based on the number of execution plans, statistical metrics, and diagnosis results of a specific query. The SQL self-diagnostics feature can collect individual statistics for SQL query information at the query, stage, and operator levels, diagnose the statistics, and then provide optimization suggestions.