# After Top SQL

![`smart`](TopSQLAfter_aa_003_20220515.png)

-------------------------------------------------------------
The Top SQL feature of TiDB Dashboard allows you to visualize the CPU overhead of each SQL statement in the database during execution, thus optimizing and handling database performance issues.

Top SQL continuously collects real-time CPU load data (statistics by SQL type) of each TiDB and TiKV instance per second, and stores it for up to 30 days. You can quickly analyze which SQL statements are causing high CPU load on a certain TiDB or TiKV instance during a certain period of time through the charts and tables displayed by Top SQL.

Top SQL has the following features:
- Visualizes the 5 types of SQL statements with the highest CPU overhead through charts and tables.
- Shows de  tailed execution information such as requests per second, average latency, and query plan.
- Provides the statistic of all SQL statements that are executing or have not been completed yet.
- Displays the specified TiDB and TiKV instances status in the cluster.