{"id":26810,"date":"2025-04-24T10:14:47","date_gmt":"2025-04-24T17:14:47","guid":{"rendered":"https:\/\/www.pingcap.com\/?p=26810"},"modified":"2025-11-14T06:38:46","modified_gmt":"2025-11-14T14:38:46","slug":"tidb-performance-hotspots-identifying-fixing-issues-using-topsql","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/","title":{"rendered":"TiDB Performance Hotspots: How to Identify and Fix Issues Using Top SQL"},"content":{"rendered":"<p><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/troubleshoot-hot-spot-issues\/\">Hotspots<\/a> are silent performance killers in distributed databases. They rarely trigger alerts \u2014 instead, they quietly erode throughput, increase tail latency, and leave your engineering team guessing. If you\u2019re running <a href=\"https:\/\/www.pingcap.com\/ko\/tidb-self-managed\/\">\ud2f0DB<\/a> at scale and suddenly one TiKV node is running hot while others sit idle, you\u2019re likely facing a hotspot.<\/p>\n\n\n\n<p>In this post, we\u2019ll walk through how to identify and diagnose hotspots in TiDB using <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/dashboard-intro\/\">TiDB Dashboard<\/a>, <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/top-sql\/\">Top SQL<\/a>, and system tables. Whether it&#8217;s due to schema design, indexing quirks, or concentrated traffic on specific keys, we\u2019ll show you how to spot trouble early \u2014 and fix it fast.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Understanding_Performance_Hotspots_in_TiDB\"><\/span>Understanding Performance Hotspots in TiDB<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In a <a href=\"https:\/\/www.pingcap.com\/ko\/blog\/why-distributed-sql-databases-elevate-modern-app-dev\/\">distributed SQL database<\/a> like TiDB, data is broken into regions \u2014 small chunks of the keyspace \u2014 and distributed across multiple storage nodes (<a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/tikv-overview\/\">TiKV<\/a> \ub610\ub294 <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/tiflash-overview\/\">TiFlash<\/a>). When too much traffic is focused on a small subset of that data, one or more nodes can become overloaded. These \u201chotspots\u201d create performance bottlenecks that degrade throughput and response time.<\/p>\n\n\n\n<p>There are two common causes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Data Skew:<\/strong> Data is unevenly distributed across regions \u2014 often because of schema design. For example:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE t (\n    a BIGINT PRIMARY KEY AUTO_INCREMENT, \n    b VARCHAR(255)\n);<\/code><\/pre>\n\n\n\n<p>This schema inserts data sequentially on Column A, concentrating on new rows in the same region. This gradually creates a write hotspot on a single TiKV node while others remain underutilized.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hot Key Access:<\/strong> A small number of rows (or even a single key) becomes a traffic hotspot \u2014 whether due to user behavior, reporting queries, or a poorly cached endpoint. When traffic patterns are skewed like this, the region holding that key becomes a bottleneck.<\/li>\n<\/ul>\n\n\n\n<p>Both of these patterns can result in excessive CPU usage, long-tail latency, and degraded cluster performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Identifying_TiDB_Performance_Hotspots_via_Monitoring\"><\/span>Identifying TiDB Performance Hotspots via Monitoring<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Diagnosing performance hotspots in TiDB starts with visibility. You want to pinpoint which nodes or queries are under pressure \u2014 and why. TiDB Dashboard provides multiple ways to uncover these issues, especially through TiKV CPU metrics and Top SQL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Spot Hot Nodes Using TiKV CPU Metrics<\/h3>\n\n\n\n<p>Start by looking at CPU usage across your TiKV nodes:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Open TiDB Dashboard and go to the TiKV CPU section.<\/li>\n\n\n\n<li>Look for nodes with significantly higher CPU usage than others.<\/li>\n\n\n\n<li>Click into those nodes for more detail \u2014 one or more may be experiencing a hotspot.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"224\" src=\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100346\/image-7-1024x224.png\" alt=\"In the example above, tikv-2 shows much higher CPU usage than its peers \u2014 a clear red flag.\" class=\"wp-image-26827\" srcset=\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100346\/image-7-1024x224.png 1024w, https:\/\/static.pingcap.com\/files\/2025\/04\/24100346\/image-7-300x66.png 300w, https:\/\/static.pingcap.com\/files\/2025\/04\/24100346\/image-7-768x168.png 768w, https:\/\/static.pingcap.com\/files\/2025\/04\/24100346\/image-7.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In the example above, <code>tikv-2<\/code> shows much higher CPU usage than its peers \u2014 a clear red flag.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Analyze Top SQL Data<\/h3>\n\n\n\n<p>Top SQL highlights the SQL queries putting the most pressure on the cluster. This makes it easier to determine whether a specific query is responsible for a hotspot.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Open the TiDB Dashboard and navigate to the Top SQL section.<\/li>\n\n\n\n<li>Look for queries that consistently appear at the top of the CPU usage list.<\/li>\n\n\n\n<li>Optimize the query or consider redistributing the data if needed.<\/li>\n<\/ol>\n\n\n\n<p><strong><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/release-8.5.0\/\">New in TiDB 8.5<\/a>: <\/strong>Top SQL can now aggregate by table, not just by query. This is useful when multiple variations of a query all hit the same table and collectively create a hotspot.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example: Identify Query-Level or Table-Level Hotspots<\/h4>\n\n\n\n<p>Suppose you notice that a specific SQL query is always at the top of the CPU usage list. That\u2019s a strong signal it may be causing a hotspot. Optimizing that query\u2014or rebalancing the data it touches\u2014can help relieve pressure on the cluster.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/static.pingcap.com\/files\/2025\/05\/20250506-105036.gif\" alt=\"\" style=\"object-fit:cover\"\/><figcaption class=\"wp-element-caption\"><em>Figure 1. TopSQL showing a high-CPU query dominating cluster resource usage.<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>If the query view alone doesn&#8217;t surface the full picture, TiDB 8.5 introduces table-level aggregation in Top SQL. This makes it easier to see which tables are associated with high resource consumption.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1076\" height=\"716\" src=\"https:\/\/static.pingcap.com\/files\/2025\/04\/05193725\/Mar-03-2025-22-43-04.gif\" alt=\"\" class=\"wp-image-27217\"\/><figcaption class=\"wp-element-caption\"><em>Figure 2. Table-level aggregation in Top SQL helps isolate which tables are causing the most load.<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">TiDB Performance Hotspots: Use System Tables to Identify Hot Regions<\/h3>\n\n\n\n<p>If TiKV CPU or Top SQL data suggests a hotspot but doesn\u2019t explain where or why it\u2019s happening, TiDB\u2019s system tables can help trace the issue further by surfacing hot regions.<\/p>\n\n\n\n<p>If Top SQL is disabled or doesn&#8217;t show enough detail, system tables offer an alternative way to pinpoint problematic regions or workloads.<\/p>\n\n\n\n<p>These tables are especially helpful when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You\u2019re seeing imbalanced load across nodes with no obvious query culprit.<\/li>\n\n\n\n<li>You want to correlate real-time or historical hotspot data to pinpoint problematic tables or partitions.<\/li>\n<\/ul>\n\n\n\n<p>Here are the key tables:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Table Name<\/strong><\/td><td><strong>Purpose<\/strong><\/td><\/tr><tr><td>TIDB_HOT_REGIONS<\/td><td>Shows active hot regions with flow rate and load degree<\/td><\/tr><tr><td>TIDB_HOT_REGIONS_HISTORY<\/td><td>Tracks past hot regions to support time-based analysis<\/td><\/tr><tr><td>TIKV_REGION_PEERS<\/td><td>Maps regions to TiKV stores and leaders<\/td><\/tr><tr><td>TIKV_STORE_STATUS<\/td><td>Helps correlate stores to specific TiKV nodes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Example: Identify Current Hot Regions<\/h4>\n\n\n\n<p>To find which regions are generating the most traffic, use this query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT h.DB_NAME, h.TABLE_NAME, h.INDEX_NAME, h.REGION_ID,\n       s.ADDRESS AS LEADER_ADDRESS, h.TYPE, h.MAX_HOT_DEGREE,\n       h.REGION_COUNT, h.FLOW_BYTES\nFROM information_schema.TIDB_HOT_REGIONS AS h\nJOIN information_schema.TIKV_REGION_PEERS AS p ON h.REGION_ID = p.REGION_ID\nJOIN information_schema.TIKV_STORE_STATUS AS s ON p.STORE_ID = s.STORE_ID\nWHERE p.IS_LEADER = 1\nORDER BY h.FLOW_BYTES DESC\nLIMIT 10;\n\n+-----------------------+------------+------------+-----------+-------------------------------------------------------------+------+----------------+--------------+------------+\n| DB_NAME               | TABLE_NAME | INDEX_NAME | REGION_ID | LEADER_ADDRESS                                              | TYPE | MAX_HOT_DEGREE | REGION_COUNT | FLOW_BYTES |\n+-----------------------+------------+------------+-----------+-------------------------------------------------------------+------+----------------+--------------+------------+\n| rg_sbtest_32_10000000 | sbtest24   | NULL       |      2196 | tc-tikv-2.tc-tikv-peer.csn-resource-control-dd5g6.svc:20160 | read |           2797 |            0 |       8138 |\n| rg_sbtest_32_10000000 | sbtest30   | NULL       |       880 | tc-tikv-1.tc-tikv-peer.csn-resource-control-dd5g6.svc:20160 | read |           2831 |            0 |          0 |\n| rg_sbtest_32_10000000 | sbtest26   | NULL       |      1548 | tc-tikv-2.tc-tikv-peer.csn-resource-control-dd5g6.svc:20160 | read |            145 |            0 |          0 |\n+-----------------------+------------+------------+-----------+-------------------------------------------------------------+------+----------------+--------------+------------+\n3 rows in set (0.46 sec)<\/code><\/pre>\n\n\n\n<p>This query highlights the Top 10 hot regions by traffic (FLOW_BYTES), along with the responsible table, index, and TiKV leader node.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Analyze Historical Hotspots<\/h3>\n\n\n\n<p>Sometimes performance issues only show up during specific periods \u2014 high-traffic spikes, batch jobs, or off-peak activity. That\u2019s where the TIDB_HOT_REGIONS_HISTORY table comes in. It helps identify when and where hotspots appeared, so you can spot patterns that real-time metrics might miss.<\/p>\n\n\n\n<p>This is especially helpful when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You need to correlate performance slowdowns with traffic surges.<\/li>\n\n\n\n<li>You\u2019re diagnosing intermittent issues that aren\u2019t visible during live analysis.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Example: Identify Hot Tables During Peak Traffic<\/h4>\n\n\n\n<p>To find which tables had the highest traffic in the last 30 minutes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT DB_NAME, TABLE_NAME, AVG(FLOW_BYTES) AS FLOW_BYTES\nFROM INFORMATION_SCHEMA.TIDB_HOT_REGIONS_HISTORY\nWHERE update_time &gt; DATE_SUB(NOW(), INTERVAL 30 MINUTE)\n  AND STORE_ID = \"1249\"\nGROUP BY DB_NAME, TABLE_NAME\nORDER BY FLOW_BYTES DESC\nLIMIT 20;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Example: Identify Hot Tables During Off-Peak Periods<\/h4>\n\n\n\n<p>You can also use off-peak periods to spot background load or unexpected hotspots that create hotspots:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT DB_NAME, TABLE_NAME, AVG(QUERY_RATE) AS QUERY_RATE\nFROM INFORMATION_SCHEMA.TIDB_HOT_REGIONS_HISTORY\nWHERE update_time BETWEEN DATE_SUB(NOW(), INTERVAL 270 MINUTE)\n                     AND DATE_SUB(NOW(), INTERVAL 240 MINUTE)\n  AND STORE_ID = \"1249\"\nGROUP BY DB_NAME, TABLE_NAME\nORDER BY QUERY_RATE DESC\nLIMIT 20;<\/code><\/pre>\n\n\n\n<p>These historical views are powerful for root cause analysis and capacity planning \u2014 especially in complex, <a href=\"https:\/\/www.pingcap.com\/ko\/blog\/multi-tenant-architecture-enhancing-database-scalability-tidb\/\">multi-tenant environments<\/a> where patterns matter more than snapshots.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Hotspots are one of the most common \u2014 and most frustrating \u2014 causes of performance issues in distributed systems. But with the right tools, they don\u2019t have to stay mysterious.<\/p>\n\n\n\n<p>TiDB gives you multiple ways to surface and understand hotspots \u2014 from TiKV CPU metrics to Top SQL and system tables that show where the traffic really lands. And with TiDB 8.5, you get even deeper visibility, including table-level insights that make troubleshooting faster and more targeted.<\/p>\n\n\n\n<p>Solving today\u2019s problems is just the start. In an upcoming post, we\u2019ll explore how <a href=\"https:\/\/www.pingcap.com\/ko\/ai\/\">AI agents<\/a> and LLMs can turn hotspot detection into something proactive \u2014 not reactive.<\/p>\n\n\n\n<p>We\u2019re always refining and sharing what we learn \u2014 if you have any questions, please feel free to connect with us on&nbsp;<a href=\"https:\/\/twitter.com\/PingCAP\" target=\"_blank\" rel=\"noreferrer noopener\">Twitter<\/a>,&nbsp;<a href=\"https:\/\/www.linkedin.com\/company\/pingcap\/mycompany\/\" target=\"_blank\" rel=\"noreferrer noopener\">LinkedIn<\/a>, or through our&nbsp;<a href=\"https:\/\/slack.tidb.io\/invite?team=tidb-community&amp;channel=everyone&amp;ref=pingcap&amp;__hstc=86493575.56092b205279b52d173af4ce908b29cc.1742330167370.1745497075252.1745507585140.107&amp;__hssc=86493575.12.1745507585140&amp;__hsfp=33693536\" target=\"_blank\" rel=\"noreferrer noopener\">Slack Channel<\/a>.&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Hotspots are silent performance killers in distributed databases. They rarely trigger alerts \u2014 instead, they quietly erode throughput, increase tail latency, and leave your engineering team guessing. If you\u2019re running TiDB at scale and suddenly one TiKV node is running hot while others sit idle, you\u2019re likely facing a hotspot. In this post, we\u2019ll walk [&hellip;]<\/p>\n","protected":false},"author":300,"featured_media":26822,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","footnotes":""},"categories":[6],"tags":[147,399,240,111,400],"class_list":["post-26810","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering","tag-distributed-sql","tag-hotspots","tag-performance","tag-tidb","tag-topsql"],"acf":[],"featured_image_src":"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png","author_info":{"display_name":"Shuning Chen","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/schen\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>TiDB Performance Hotspots: Fixing Issues with Top SQL<\/title>\n<meta name=\"description\" content=\"Discover how to identify and diagnose TiDB performance hotspots early using TiDB Dashboard, TopSQL, and system tables \u2014 and fix it fast.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"TiDB Performance Hotspots: Fixing Issues with Top SQL\" \/>\n<meta property=\"og:description\" content=\"Discover how to identify and diagnose TiDB performance hotspots early using TiDB Dashboard, TopSQL, and system tables \u2014 and fix it fast.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-24T17:14:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T14:38:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100051\/tidb_1200x627-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1254\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shuning Chen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100110\/tidb_twitter_1600x900-7-scaled.png\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shuning Chen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\"},\"author\":{\"name\":\"Shuning Chen\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/467f5065796fcac5f754312d5fd9f271\"},\"headline\":\"TiDB Performance Hotspots: How to Identify and Fix Issues Using Top SQL\",\"datePublished\":\"2025-04-24T17:14:47+00:00\",\"dateModified\":\"2025-11-14T14:38:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\"},\"wordCount\":1074,\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png\",\"keywords\":[\"Distributed SQL\",\"Hotspots\",\"Performance\",\"TiDB\",\"TopSQL\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\",\"url\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\",\"name\":\"TiDB Performance Hotspots: Fixing Issues with Top SQL\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png\",\"datePublished\":\"2025-04-24T17:14:47+00:00\",\"dateModified\":\"2025-11-14T14:38:46+00:00\",\"description\":\"Discover how to identify and diagnose TiDB performance hotspots early using TiDB Dashboard, TopSQL, and system tables \u2014 and fix it fast.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage\",\"url\":\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png\",\"width\":2560,\"height\":853},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TiDB Performance Hotspots: How to Identify and Fix Issues Using Top SQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pingcap.com\/#website\",\"url\":\"https:\/\/www.pingcap.com\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pingcap.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pingcap.com\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\/\/www.pingcap.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pingcap2015\",\"https:\/\/x.com\/PingCAP\",\"https:\/\/linkedin.com\/company\/pingcap\",\"https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/467f5065796fcac5f754312d5fd9f271\",\"name\":\"Shuning Chen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"caption\":\"Shuning Chen\"},\"description\":\"Database Software Engineer\",\"url\":\"https:\/\/www.pingcap.com\/ko\/blog\/author\/schen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"TiDB Performance Hotspots: Fixing Issues with Top SQL","description":"Discover how to identify and diagnose TiDB performance hotspots early using TiDB Dashboard, TopSQL, and system tables \u2014 and fix it fast.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/","og_locale":"ko_KR","og_type":"article","og_title":"TiDB Performance Hotspots: Fixing Issues with Top SQL","og_description":"Discover how to identify and diagnose TiDB performance hotspots early using TiDB Dashboard, TopSQL, and system tables \u2014 and fix it fast.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2025-04-24T17:14:47+00:00","article_modified_time":"2025-11-14T14:38:46+00:00","og_image":[{"width":2400,"height":1254,"url":"https:\/\/static.pingcap.com\/files\/2025\/04\/24100051\/tidb_1200x627-5.png","type":"image\/png"}],"author":"Shuning Chen","twitter_card":"summary_large_image","twitter_image":"https:\/\/static.pingcap.com\/files\/2025\/04\/24100110\/tidb_twitter_1600x900-7-scaled.png","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"Written by":"Shuning Chen","Est. reading time":"7\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/"},"author":{"name":"Shuning Chen","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/467f5065796fcac5f754312d5fd9f271"},"headline":"TiDB Performance Hotspots: How to Identify and Fix Issues Using Top SQL","datePublished":"2025-04-24T17:14:47+00:00","dateModified":"2025-11-14T14:38:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/"},"wordCount":1074,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png","keywords":["Distributed SQL","Hotspots","Performance","TiDB","TopSQL"],"articleSection":["Engineering"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/","url":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/","name":"TiDB Performance Hotspots: Fixing Issues with Top SQL","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png","datePublished":"2025-04-24T17:14:47+00:00","dateModified":"2025-11-14T14:38:46+00:00","description":"Discover how to identify and diagnose TiDB performance hotspots early using TiDB Dashboard, TopSQL, and system tables \u2014 and fix it fast.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png","width":2560,"height":853},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"TiDB Performance Hotspots: How to Identify and Fix Issues Using Top SQL"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/467f5065796fcac5f754312d5fd9f271","name":"Shuning Chen","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/","url":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","caption":"Shuning Chen"},"description":"Database Software Engineer","url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/schen\/"}]}},"grav_blocks":false,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/tidb-performance-hotspots-identifying-fixing-issues-using-topsql\/\"><div class=\"card-resource__image-container\"><img class=\"card-resource__image\" alt=\"tidb_feature_1800x600 (1)\" src=\"https:\/\/static.pingcap.com\/files\/2025\/04\/24100032\/tidb_feature_1800x600-1-5-scaled.png\" loading=\"lazy\" width=2560 height=853 \/><\/div><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Engineering<\/div><\/div><h5 class=\"card-resource__title\">TiDB Performance Hotspots: How to Identify and Fix Issues Using Top SQL<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/26810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/300"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=26810"}],"version-history":[{"count":23,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/26810\/revisions"}],"predecessor-version":[{"id":30523,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/26810\/revisions\/30523"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/26822"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=26810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=26810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=26810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}