How to query SQL memory execution information and historical execution information in TiDB, similar to Oracle's v$SQL and dba_hist_sqlstat?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiDB如何查询SQL的内存执行信息以及历史执行信息,类似Oracle的v$SQL以及dba_hist_sqlstat?

| username: alfred

To improve efficiency, please provide the following information. Clear problem descriptions can be resolved faster:
[TiDB Usage Environment]

[Overview] Scenario + Problem Overview

[Background] Operations performed

[Phenomenon] Business and database phenomena

[Problem] Current issue encountered

[Business Impact]

[TiDB Version]

[Application Software and Version]

[Attachments] Relevant logs and configuration information

  • TiUP Cluster Display information
  • TiUP Cluster Edit config information

Monitoring (https://metricstool.pingcap.com/)

  • TiDB-Overview Grafana monitoring
  • TiDB Grafana monitoring
  • TiKV Grafana monitoring
  • PD Grafana monitoring
  • Corresponding module logs (including logs 1 hour before and after the issue)

If the question is related to performance optimization or troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output results for upload.

| username: 啦啦啦啦啦 | Original post link

Take a look at this table
INFORMATION_SCHEMA.STATEMENTS_SUMMARY_HISTORY

| username: hey-hoho | Original post link

Refer to the Statement Summary feature:

| username: alfred | Original post link

Indeed, the functionality is similar.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.