TiDB Dashboard

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

Original topic: tidb-dashboard

| username: yulei7633

Slow queries on the tidb-dashboard page:

Due to the large amount of data generated during the stress test in the cluster, are these slow queries generated when I click on the dashboard or are they run by the system itself?

| username: Billmay表妹 | Original post link

Slow queries are automatically generated during the system’s operation, not when you click on the Dashboard. A slow query refers to a query statement that exceeds a certain execution time threshold. TiDB automatically records these queries and displays them on the slow query page of the Dashboard.

When you view slow queries on the Dashboard, you are seeing a list of slow queries recorded by the system over a period of time. These queries may be initiated by your application or executed by the system itself. The occurrence of slow queries can be related to factors such as the complexity of the query statement, the amount of data, and the use of indexes.

By viewing the slow query list, you can analyze and optimize these queries to improve system performance. You can use the tools provided by the Dashboard to view the execution plan of slow queries, index usage, and other information to identify potential performance bottlenecks and take appropriate optimization measures.

If you want to reduce the number or frequency of slow queries, consider the following points:

  1. Optimize query statements: Ensure that query statements use appropriate indexes, avoid full table scans, and unnecessary data operations.
  2. Adjust system configuration: Adjust TiDB’s configuration parameters based on your application load and hardware resources to achieve better performance.
  3. Optimize data distribution: Ensure that data is evenly distributed among TiKV nodes to avoid performance issues caused by hotspot data.
  4. Regularly collect statistics: Use the ANALYZE TABLE command to regularly collect table statistics to optimize query plans.

By implementing the above optimization measures, you can reduce the number and execution time of slow queries, thereby improving the performance and stability of TiDB.

For more detailed performance optimization advice, it is recommended to refer to the performance optimization section of the official TiDB documentation or seek help from the TiDB community.

TiDB Official Documentation: TiDB Introduction | PingCAP Docs

| username: TiDBer_QYr0vohO | Original post link

Click to view detailed information, which indicates whether it is an internal SQL and the username that executed it.

| username: yulei7633 | Original post link

Thank you for your response, cousin.

| username: TiDBer_QYr0vohO | Original post link

Clicking on some pages of the dashboard will also trigger specific SQL queries.

| username: yulei7633 | Original post link

My cousin answered a lot, but she didn’t address the main points. It was all official jargon.

| username: yulei7633 | Original post link

Thank you, I understand now.

| username: 芮芮是产品 | Original post link

These look like slow SQL queries generated by the dashboard.

| username: yulei7633 | Original post link

Yes, the SQL statements generated by the dashboard.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.