Query performance analysis

Updated at:
Copy as MD

ApsaraDB for SelectDB provides EXPLAIN statements and the query profile feature to help you understand query execution, identify performance bottlenecks, and optimize queries from different perspectives.

  • EXPLAIN statements analyze execution plans to help you understand how queries run, identify potential issues, and guide optimization.

  • The query profile feature collects runtime statistical metrics to provide actual performance data, helping you locate bottlenecks and verify optimization results.

These two tools complement each other. Combine them to gain a complete understanding of query execution and performance in ApsaraDB for SelectDB.

Tool

EXPLAIN statement

Query profile

Positioning

A performance analysis tool based on execution plans.

A performance analysis tool based on quantitative statistical metrics.

Functionality

  • Checks whether the execution plan generated by the optimizer is reasonable.

  • Identifies potential performance issues.

  • Verifies the optimization effectiveness.

  • Monitors the query performance during the query execution.

  • Locates performance bottlenecks.

  • Verifies the optimization effectiveness.

Scenario

  • You want to analyze the execution plan before the optimization.

  • You want to design indexes and materialized views or adjust the SQL logic.

  • You want to verify the performance after the optimization.

  • You want to analyze performance bottlenecks during the query.