{"id":25891,"date":"2025-03-22T12:52:00","date_gmt":"2025-03-22T19:52:00","guid":{"rendered":"https:\/\/www.pingcap.com\/?p=25891"},"modified":"2025-03-24T13:41:28","modified_gmt":"2025-03-24T20:41:28","slug":"tidb-index-optimization-best-practices-better-performance","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/tidb-index-optimization-best-practices-better-performance\/","title":{"rendered":"TiDB Index Optimization: Detect and Remove Unused Indexes for Better Performance"},"content":{"rendered":"<p>Indexes are essential for optimizing database <a href=\"https:\/\/www.pingcap.com\/ko\/blog\/accelerating-query-performance-tidb-in-memory-engine\/\">query performance<\/a>, reducing the need to scan large amounts of data. However, as applications evolve, business logic changes, and data volume grows, indexing inefficiencies emerge. This leads to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Unused Indexes:<\/strong> These indexes were once relevant but are no longer selected by the query optimizer, consuming storage and adding unnecessary overhead to write operations.<\/li>\n\n\n\n<li><strong>Inefficient Indexes:<\/strong> Some indexes are used by the optimizer but scan more data than expected, increasing disk I\/O and slowing down query performance.<\/li>\n<\/ul>\n\n\n\n<p>Left unaddressed, these indexing issues can cause higher storage costs, degraded performance, and operational inefficiencies. That\u2019s why regular index audits are crucial for maintaining an optimized database.<\/p>\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 <a href=\"https:\/\/www.pingcap.com\/ko\/tidb-self-managed\/\">\ud2f0DB<\/a>, indexing inefficiencies have an even greater impact due to the scale of distributed queries and the complexity of multi-node coordination. Proactively identifying and optimizing indexes helps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reduce Storage Overhead:<\/strong> Removing unused indexes frees up disk space and reduces long-term storage costs.<\/li>\n\n\n\n<li><strong>Improve Write Performance:<\/strong> Write-heavy workloads (<code>INSERT<\/code>, <code>UPDATE<\/code>, <code>DELETE<\/code>) perform better when unnecessary index maintenance is eliminated.<\/li>\n\n\n\n<li><strong>Optimize Query Execution:<\/strong> Efficient indexes reduce the number of rows scanned, improving query speed and response times.<\/li>\n\n\n\n<li><strong>Streamline Database Management:<\/strong> Fewer, well-optimized indexes simplify backups, recovery, and schema changes.<\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/release-8.0.0\/\">TiDB 8.0<\/a> introduces dedicated system views to help DBAs and developers track index usage patterns and make data-driven decisions. This blog post explores the tools needed to detect and eliminate unused or inefficient indexes, improving TiDB\u2019s performance and stability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Index_Optimization_Matters\"><\/span>Why Index Optimization Matters<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Unused and inefficient indexes are more than just wasted space \u2014 they directly impact database performance and scalability. Proactively managing indexes in TiDB can significantly enhance system efficiency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Benefits of TiDB Index Optimization<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reduce Storage Costs: <\/strong>Every index consumes disk space. As databases grow, maintaining unused indexes leads to unnecessary storage expansion. Removing them frees up space and lowers operational costs.<\/li>\n\n\n\n<li><strong>Improve Write Performance: <\/strong>Every <code>INSERT<\/code>, <code>UPDATE<\/code>, \uadf8\ub9ac\uace0 <code>DELETE<\/code> operation must update associated indexes. Redundant indexes slow down these operations, particularly in high-concurrency workloads. Optimizing index usage reduces write latency and improves overall system responsiveness.<\/li>\n\n\n\n<li><strong>Enhance Query Performance: <\/strong>Inefficient indexes can cause excessive data scans, increasing disk I\/O and query latency. By ensuring indexes are highly selective and well-optimized, query execution becomes faster and more efficient.<\/li>\n\n\n\n<li><strong>Streamline Database Administration: <\/strong>A cluttered database with too many indexes complicates backups, recovery, and schema changes. Reducing unnecessary indexes simplifies database management, making maintenance smoother.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Making Index Optimization a Habit<\/h3>\n\n\n\n<p>Because indexes evolve with changing business logic, regular index audits should be a standard part of database maintenance. TiDB provides built-in observability tools to help users detect, evaluate, and optimize indexes without risk.<\/p>\n\n\n\n<p>In the next section, we\u2019ll explore how TiDB 8.0\u2019s <code>TIDB_INDEX_USAGE<\/code> \uadf8\ub9ac\uace0 <code>schema_unused_indexes<\/code> views help DBAs efficiently track and optimize indexes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TiDB_Index_Optimization_A_Data-Driven_Approach\"><\/span>TiDB Index Optimization: A Data-Driven Approach<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Indexes are essential for query performance, but removing them without proper analysis can lead to unexpected regressions or even system instability. To ensure safe and effective index management, TiDB provides built-in observability tools that allow users to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Track Index Usage in Real-Time:<\/strong> Identify how often an index is accessed and whether it contributes to performance improvements.<\/li>\n\n\n\n<li><strong>Detect Unused Indexes:<\/strong> Locate indexes that have not been used since the database was last restarted.<\/li>\n\n\n\n<li><strong>Assess Index Efficiency: <\/strong>Evaluate whether an index filters data effectively or causes excessive I\/O overhead.<\/li>\n\n\n\n<li><strong>Safely Test Index Removal:<\/strong> Temporarily make an index invisible before deleting it to ensure no queries depend on it.<\/li>\n<\/ul>\n\n\n\n<p>TiDB simplifies index optimization by introducing three powerful tools:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/information-schema-tidb-index-usage\/#tidb_index_usage\">TIDB_INDEX_USAGE<\/a><\/code>: Monitors index usage patterns and query frequency.<\/li>\n\n\n\n<li><code><a href=\"https:\/\/docs.pingcap.com\/zh\/tidb\/stable\/sys-schema-unused-indexes\/#schema_unused_indexes\">schema_unused_indexes<\/a><\/code>: Lists indexes that have not been used since the last TiDB restart.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/system-variables\/#tidb_opt_use_invisible_indexes-new-in-v800\">Invisible Indexes<\/a><\/strong>: Allows DBAs to test the impact of removing an index before permanently deleting it.<\/li>\n<\/ul>\n\n\n\n<p>By using these observability tools, TiDB users can confidently clean up redundant indexes without risking performance degradation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TiDB_Index_Optimization_Tracking_Index_Usage_with_TIDB_INDEX_USAGE\"><\/span>TiDB Index Optimization: Tracking Index Usage with <code>TIDB_INDEX_USAGE<\/code><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Introduced in TiDB 8.0, the <code>TIDB_INDEX_USAGE<\/code> system table provides real-time insights into how indexes are used, helping DBAs optimize query performance and remove unnecessary indexes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why Use <code>TIDB_INDEX_USAGE<\/code>?<\/h3>\n\n\n\n<p>This system table enables users to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Detect Unused Indexes:<\/strong> Identify indexes that have not been accessed by queries, helping determine which ones can be safely removed.<\/li>\n\n\n\n<li><strong>Analyze Index Efficiency:<\/strong> Track how frequently an index is used and whether it contributes to efficient query execution.<\/li>\n\n\n\n<li><strong>Evaluate Query Patterns:<\/strong> Understand how indexes affect read operations, data scans, and key-value (KV) requests.<\/li>\n<\/ul>\n\n\n\n<p>Since <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/release-8.4.0\/\">TiDB 8.4<\/a>, the table also includes primary keys in clustered tables, offering deeper visibility into index performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Metrics in <code>TIDB_INDEX_USAGE<\/code><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Column<\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td>TABLE_SCHEMA<\/td><td>Database name containing the index.<\/td><\/tr><tr><td>TABLE_NAME<\/td><td>Table name containing the index.<\/td><\/tr><tr><td>INDEX_NAME<\/td><td>Index name.<\/td><\/tr><tr><td>QUERY_TOTAL<\/td><td>Total number of queries that accessed the index. If 0, the index is unused.<\/td><\/tr><tr><td>KV_REQ_TOTAL<\/td><td>Total KV requests generated by the index.<\/td><\/tr><tr><td>ROWS_ACCESS_TOTAL<\/td><td>Total number of rows scanned using the index.<\/td><\/tr><tr><td>PERCENTAGE_ACCESS_0<\/td><td>Number of times no rows were accessed.<\/td><\/tr><tr><td>PERCENTAGE_ACCESS_0_1<\/td><td>Number of times 0%-1% of table rows were accessed.<\/td><\/tr><tr><td>PERCENTAGE_ACCESS_1_10<\/td><td>Number of times 1%-10% of table rows were accessed.<\/td><\/tr><tr><td>PERCENTAGE_ACCESS_10_20<\/td><td>Number of times 10%-20% of table rows were accessed.<\/td><\/tr><tr><td>PERCENTAGE_ACCESS_20_50<\/td><td>Number of times 20%-50% of table rows were accessed.<\/td><\/tr><tr><td>PERCENTAGE_ACCESS_50_100<\/td><td>Number of times 50%-100% of table rows were accessed.<\/td><\/tr><tr><td>PERCENTAGE_ACCESS_100<\/td><td>Number of times the entire table was scanned.<\/td><\/tr><tr><td>LAST_ACCESS_TIME<\/td><td>Timestamp of the most recent query using the index.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">How to Identify Unused and Inefficient Indexes using <code>TIDB_INDEX_USAGE<\/code><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Unused Indexes:<\/strong>\n<ul class=\"wp-block-list\">\n<li>If <code>QUERY_TOTAL<\/code> = 0, the index has not been used by any queries.<\/li>\n\n\n\n<li>If <code>LAST_ACCESS_TIME<\/code> is a long time ago, the index may no longer be relevant.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Inefficient Indexes:<\/strong>\n<ul class=\"wp-block-list\">\n<li>High values in <code>PERCENTAGE_ACCESS_100<\/code> suggest full index scans, which may indicate an inefficient index.<\/li>\n\n\n\n<li>Comparing <code>ROWS_ACCESS_TOTAL<\/code> \/ <code>QUERY_TOTAL<\/code> helps determine whether the index scans too many rows relative to its usage.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>By leveraging <code>TIDB_INDEX_USAGE<\/code>, TiDB users can gain detailed insights into index performance, making it easier to remove unnecessary indexes and optimize query execution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Handling Index Usage Data Efficiently<\/h3>\n\n\n\n<p><strong>Delayed Data Updates<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To minimize performance impact, <code>TIDB_INDEX_USAGE<\/code> does not update instantly. Index usage metrics may be delayed by up to 5 minutes, so users should account for this when analyzing queries.<\/li>\n<\/ul>\n\n\n\n<p><strong>Index Usage Data is Not Persisted<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>TIDB_INDEX_USAGE<\/code> stores data in memory, meaning it does not persist across node restarts.<\/li>\n\n\n\n<li>If a TiDB node is restarted, all index usage statistics from that node will be cleared.<\/li>\n<\/ul>\n\n\n\n<p><strong>Planned Enhancements for Historical Tracking<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>TiDB is developing a Workload Repository to periodically snapshot index usage data, allowing users to review trends over time instead of relying only on real-time metrics.<\/li>\n\n\n\n<li>Until this feature is available, DBAs can periodically export index usage snapshots using:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM INFORMATION_SCHEMA.TIDB_INDEX_USAGE INTO OUTFILE '\/backup\/index_usage_snapshot.csv';<\/code><\/pre>\n\n\n\n<p>This allows for historical tracking by comparing snapshots over time to detect trends in index usage and make more informed pruning decisions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TiDB_Index_Optimization_Consolidating_Index_Usage_Data_Across_TiDB_Nodes\"><\/span>TiDB Index Optimization: Consolidating Index Usage Data Across TiDB Nodes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Since TiDB is a distributed SQL database, query workloads are spread across multiple nodes. Each TiDB node tracks its own local index usage, but for a global view of index performance, TiDB provides the <code>CLUSTER_TIDB_INDEX_USAGE<\/code> system table.<\/p>\n\n\n\n<p>This view consolidates index usage data from all TiDB nodes, ensuring that distributed query workloads are fully accounted for when optimizing indexing strategies.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How <code>CLUSTER_TIDB_INDEX_USAGE<\/code> Helps<\/h3>\n\n\n\n<p>Unlike <code>TIDB_INDEX_USAGE<\/code>, which provides insights at the node level, this cluster-wide view allows users to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Detect inconsistencies in index usage: <\/strong>for example, an index may be frequently used on some nodes but unused on others.<\/li>\n\n\n\n<li><strong>Analyze global index patterns for distributed queries<\/strong>, ensuring indexing decisions reflect real-world workload distribution.<\/li>\n\n\n\n<li><strong>Optimize indexing strategies across all nodes<\/strong>, improving query efficiency for multi-node deployments.<\/li>\n<\/ul>\n\n\n\n<p>Different TiDB nodes may experience different query workloads, so an index that appears unused on some nodes may still be critical elsewhere. To segment index analysis by workload, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT INSTANCE, TABLE_NAME, INDEX_NAME, SUM(QUERY_TOTAL) AS total_queries\nFROM INFORMATION_SCHEMA.CLUSTER_TIDB_INDEX_USAGE\nGROUP BY INSTANCE, TABLE_NAME, INDEX_NAME\nORDER BY total_queries DESC;<\/code><\/pre>\n\n\n\n<p>This helps determine whether an index is truly unused across all nodes or only for specific instances, allowing DBAs to make informed decisions on index removal.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Differences from <code>TIDB_INDEX_USAGE<\/code><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Feature<\/strong><\/td><td><code>TIDB_INDEX_USAGE<\/code><\/td><td><code>CLUSTER_TIDB_INDEX_USAGE<\/code><\/td><\/tr><tr><td><strong>Scope<\/strong><\/td><td>Tracks index usage within a single database<\/td><td>Aggregates index usage across the entire TiDB cluster<\/td><\/tr><tr><td><strong>Index Tracking<\/strong><\/td><td>Data is local to each database<\/td><td>Centralized cluster-wide view<\/td><\/tr><tr><td><strong>Primary Use Case<\/strong><\/td><td>Debugging index usage at the database instance level<\/td><td>Analyzing global index patterns and multi-node behavior<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Using <code>CLUSTER_TIDB_INDEX_USAGE<\/code> Effectively<\/h3>\n\n\n\n<p>Since this system table consolidates data from multiple nodes, consider the following:<\/p>\n\n\n\n<p><strong>Delayed Data Updates<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The data is refreshed periodically to minimize performance impact. If index usage is analyzed immediately after a query execution, allow time for metrics to update.<\/li>\n<\/ul>\n\n\n\n<p><strong>Memory-Based Storage<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Like <code>TIDB_INDEX_USAGE<\/code>, this system table does not persist data across node restarts. If a node goes down, its recorded index usage data will be lost.<\/li>\n<\/ul>\n\n\n\n<p><strong>Future Enhancements for Historical Tracking<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>TiDB is introducing a Workload Repository that will periodically snapshot index usage metrics, allowing DBAs to analyze trends over time instead of relying solely on real-time data.<\/li>\n<\/ul>\n\n\n\n<p>By leveraging <code>CLUSTER_TIDB_INDEX_USAGE<\/code>, TiDB users can gain a global perspective on index behavior, ensuring indexing strategies are aligned with distributed query workloads.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TiDB_Index_Optimization_Easily_Identifying_Unused_Indexes_with_schema_unused_indexes\"><\/span>TiDB Index Optimization: Easily Identifying Unused Indexes with <code>schema_unused_indexes<\/code><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Manually analyzing index usage data can be time-consuming. To simplify this process, TiDB provides schema_unused_indexes, a system view that lists indexes that haven\u2019t been used since the database was last restarted.<\/p>\n\n\n\n<p>This provides a quick way for DBAs to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Identify indexes that are no longer in use, reducing unnecessary storage costs.<\/li>\n\n\n\n<li>Speed up DML operations by eliminating indexes that add overhead to <code>INSERT<\/code>, <code>UPDATE<\/code>, \uadf8\ub9ac\uace0 <code>DELETE<\/code> queries.<\/li>\n\n\n\n<li>Streamline index audits without needing to manually analyze query patterns.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How <code>schema_unused_indexes<\/code> Works<\/h3>\n\n\n\n<p>The <code>schema_unused_indexes<\/code> view is derived from <code>TIDB_INDEX_USAGE<\/code>, meaning it automatically filters out indexes that have recorded zero query activity since the last TiDB restart.<\/p>\n\n\n\n<p>To retrieve a list of unused indexes, simply run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM sys.schema_unused_indexes;<\/code><\/pre>\n\n\n\n<p>This will return a result set similar to:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><code>object_schema<\/code><\/td><td><code>object_name<\/code><\/td><td><code>index_name<\/code><\/td><\/tr><tr><td><code>bookshop<\/code><\/td><td><code>users<\/code><\/td><td><code>nickname<\/code><\/td><\/tr><tr><td><code>bookshop<\/code><\/td><td><code>ratings<\/code><\/td><td><code>uniq_book_user_idx<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Important Considerations When Using <code>schema_unused_indexes<\/code><\/h3>\n\n\n\n<p><strong>Indexes Are Considered \u201cUnused\u201d Only Since the Last Restart<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If a TiDB node restarts, the usage tracking data is reset.<\/li>\n\n\n\n<li>Ensure the system has been running long enough to capture a representative workload before relying on this data.<\/li>\n<\/ul>\n\n\n\n<p><strong>Not All Unused Indexes Should Be Dropped Immediately<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Some indexes may be rarely used but still essential for specific queries, batch jobs, or reporting tasks. Before dropping an index, consider whether it supports:\n<ul class=\"wp-block-list\">\n<li>Rare but essential queries (e.g., monthly reports, analytics)<\/li>\n\n\n\n<li>Batch processing jobs that don\u2019t run daily<\/li>\n\n\n\n<li>Ad-hoc troubleshooting queries used by DBAs<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>If the index appears in important but infrequent queries, consider keeping it or making it invisible first.<\/li>\n\n\n\n<li>Use <strong>Invisible Indexes<\/strong> (covered in the next section) to safely test whether an index can be removed without impacting performance.<\/li>\n<\/ul>\n\n\n\n<p>By leveraging <code>schema_unused_indexes<\/code>, TiDB users can quickly identify unnecessary indexes and reduce database overhead with minimal effort.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TiDB_Index_Optimization_Safely_Testing_Index_Removal_with_Invisible_Indexes\"><\/span>TiDB Index Optimization: Safely Testing Index Removal with Invisible Indexes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Removing an index without proper validation can lead to unexpected performance issues, especially if the index is infrequently used but still critical for certain queries. To mitigate this risk, TiDB provides Invisible Indexes, allowing DBAs to temporarily disable an index without deleting it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What Are Invisible Indexes?<\/h3>\n\n\n\n<p>An Invisible Index remains in the database but is ignored by the TiDB optimizer. This allows users to test whether an index is truly unnecessary without permanently removing it.<\/p>\n\n\n\n<p>Key benefits include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Safe Index Testing<\/strong> \u2013 Queries will no longer use the index, but it can be quickly restored if needed.<\/li>\n\n\n\n<li><strong>Zero Disruption to Index Storage<\/strong> \u2013 The index remains intact, ensuring no need for costly re-creation.<\/li>\n\n\n\n<li><strong>Performance Monitoring <\/strong>\u2013 DBAs can observe query behavior without the index before making a final decision.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Using Invisible Indexes in TiDB<\/h3>\n\n\n\n<p>To make an index <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/sql-statement-create-index#invisible-index\">invisible<\/a> (without dropping it), use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER TABLE bookshop.users ALTER INDEX nickname INVISIBLE;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Monitor Query Performance<\/h3>\n\n\n\n<p>After making the index invisible, observe the system\u2019s query performance:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If performance remains unchanged, the index is likely unnecessary and can be safely removed.<\/li>\n\n\n\n<li>If query latency increases, the index may still be needed, and removal should be reconsidered.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Best Practices for Using Invisible Indexes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Test During Off-Peak Hours<\/strong> \u2013 Monitor performance impact in a controlled environment.<\/li>\n\n\n\n<li><strong>Use Query Monitoring Tools <\/strong>\u2013 Analyze query execution plans before and after marking an index as invisible.<\/li>\n\n\n\n<li><strong>Confirm Over Multiple Workloads<\/strong> \u2013 Ensure the index isn\u2019t needed for specific reports or scheduled queries.<\/li>\n<\/ul>\n\n\n\n<p>By leveraging Invisible Indexes, TiDB users can validate index removal decisions without risk, ensuring a more controlled and predictable database optimization process.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">How Long Should an Index Remain Invisible?<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>OLTP<\/strong><strong> workloads:<\/strong> Monitor for at least one week to account for daily variations.<\/li>\n\n\n\n<li><strong>Batch processing\/ETL workloads:<\/strong> Allow one full reporting cycle (e.g., a monthly financial report run).<\/li>\n\n\n\n<li><strong>Ad-hoc analytical queries:<\/strong> Use query logs to confirm the index isn\u2019t needed before dropping it.<\/li>\n<\/ul>\n\n\n\n<p>For safety, keep the index invisible for at least one full business cycle to ensure all workloads have been tested before making a final decision.\u201d*<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>System Table <\/strong><strong><code><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/sys-schema-unused-indexes#schema_unused_indexes\">schema_unused_indexes<\/a><\/code><\/strong><\/h4>\n\n\n\n<p>To make it easier for users to get the results, TiDB also provides a MySQL-compatible view <code><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/sys-schema-unused-indexes#schema_unused_indexes\">sys.schema_unused_indexes<\/a><\/code>, which lists indexes that have not been used since all TiDB instances were last started. The data for this view comes from <code>TIDB_INDEX_USAGE<\/code>. Note that since <code>TIDB_INDEX_USAGE<\/code> is cleared after a TiDB node restart, you should ensure that the node has been running for a sufficient amount of time before making decisions.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>For clusters upgraded from older versions to TiDB 8.0 and higher, the <code>sys<\/code> schema and the included views must be manually created. Please refer to <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/sys-schema-unused-indexes#manually-create-the-schema_unused_indexes-view\">the official documentation<\/a> for instructions.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary_Key_Takeaways\"><\/span>Summary &amp; Key Takeaways<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Effective index management is crucial for maintaining database performance in TiDB. By leveraging TiDB\u2019s built-in observability tools, DBAs can easily identify, evaluate, and optimize indexes without risking system stability.<\/p>\n\n\n\n<p>By following the below best practices, TiDB users can keep their databases optimized, reduce unnecessary resource consumption, and maintain peak query performance.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Monitor Index Usage Regularly<\/strong>\n<ol class=\"wp-block-list\">\n<li>Use <code>TIDB_INDEX_USAGE<\/code> to track index query activity.<\/li>\n\n\n\n<li>Use <code>CLUSTER_TIDB_INDEX_USAGE<\/code> for a cluster-wide view of index behavior.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Identify Unused Indexes with Confidence<\/strong>\n<ol class=\"wp-block-list\">\n<li>Use <code>schema_unused_indexes<\/code> to list indexes that haven\u2019t been used since the last restart.<\/li>\n\n\n\n<li>Be cautious\u2014some indexes may be used infrequently but remain critical for specific queries.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Safely Test Index Removal with Invisible Indexes<\/strong>\n<ol class=\"wp-block-list\">\n<li>Mark an index as <code>INVISIBLE<\/code> before dropping it to validate its necessity.<\/li>\n\n\n\n<li>Restore visibility if query performance is negatively affected.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Optimize Indexes to Reduce Overhead<\/strong>\n<ol class=\"wp-block-list\">\n<li>Avoid redundant or low-selectivity indexes that consume storage and slow down write operations.<\/li>\n\n\n\n<li>Optimize index structures to improve query filtering efficiency.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Prioritize Ongoing Index Maintenance<\/strong>\n<ol class=\"wp-block-list\">\n<li>Regularly audit indexes after schema changes, application updates, or workload shifts.<\/li>\n\n\n\n<li>Use TiDB\u2019s execution plan analysis tools to ensure indexes are used effectively.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p>If you have any questions about TiDB index optimization, 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.1742831089012.1742837497224.21&amp;__hssc=86493575.4.1742837497224&amp;__hsfp=2436917072\" target=\"_blank\" rel=\"noreferrer noopener\">Slack Channel<\/a>.&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Indexes are essential for optimizing database query performance, reducing the need to scan large amounts of data. However, as applications evolve, business logic changes, and data volume grows, indexing inefficiencies emerge. This leads to: Left unaddressed, these indexing issues can cause higher storage costs, degraded performance, and operational inefficiencies. That\u2019s why regular index audits are [&hellip;]<\/p>\n","protected":false},"author":261,"featured_media":25993,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","footnotes":""},"categories":[13],"tags":[147,388,389,390,111],"class_list":["post-25891","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-product","tag-distributed-sql","tag-index-optimization","tag-online-schema","tag-system-efficiency","tag-tidb"],"acf":[],"featured_image_src":"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png","author_info":{"display_name":"Roger Song","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/roger-song\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>TiDB Index Optimization: Best Practices for Better Performance<\/title>\n<meta name=\"description\" content=\"Explore the tools and strategies behind TiDB index optimization to eliminate inefficient indexes while improving performance and stability.\" \/>\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-index-optimization-best-practices-better-performance\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"TiDB Index Optimization: Best Practices for Better Performance\" \/>\n<meta property=\"og:description\" content=\"Explore the tools and strategies behind TiDB index optimization to eliminate inefficient indexes while improving performance and stability.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/tidb-index-optimization-best-practices-better-performance\/\" \/>\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-03-22T19:52:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-24T20:41:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2025\/03\/24124505\/tidb_1200x627-2.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=\"Roger Song\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/static.pingcap.com\/files\/2025\/03\/24124521\/tidb_twitter_1600x900-2.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=\"Roger Song\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13\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-index-optimization-best-practices-better-performance\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/\"},\"author\":{\"name\":\"Roger Song\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/2c15dfa5c1001589a8eee81137017ee4\"},\"headline\":\"TiDB Index Optimization: Detect and Remove Unused Indexes for Better Performance\",\"datePublished\":\"2025-03-22T19:52:00+00:00\",\"dateModified\":\"2025-03-24T20:41:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/\"},\"wordCount\":2392,\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png\",\"keywords\":[\"Distributed SQL\",\"Index Optimization\",\"Online Schema\",\"System Efficiency\",\"TiDB\"],\"articleSection\":[\"Product\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/\",\"url\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/\",\"name\":\"TiDB Index Optimization: Best Practices for Better Performance\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png\",\"datePublished\":\"2025-03-22T19:52:00+00:00\",\"dateModified\":\"2025-03-24T20:41:28+00:00\",\"description\":\"Explore the tools and strategies behind TiDB index optimization to eliminate inefficient indexes while improving performance and stability.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage\",\"url\":\"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png\",\"width\":3600,\"height\":1200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TiDB Index Optimization: Detect and Remove Unused Indexes for Better Performance\"}]},{\"@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\/2c15dfa5c1001589a8eee81137017ee4\",\"name\":\"Roger Song\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2024\/02\/07174739\/roger-song-150x150.jpeg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2024\/02\/07174739\/roger-song-150x150.jpeg\",\"caption\":\"Roger Song\"},\"description\":\"TiDB Product Manager\",\"url\":\"https:\/\/www.pingcap.com\/ko\/blog\/author\/roger-song\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"TiDB Index Optimization: Best Practices for Better Performance","description":"Explore the tools and strategies behind TiDB index optimization to eliminate inefficient indexes while improving performance and stability.","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-index-optimization-best-practices-better-performance\/","og_locale":"ko_KR","og_type":"article","og_title":"TiDB Index Optimization: Best Practices for Better Performance","og_description":"Explore the tools and strategies behind TiDB index optimization to eliminate inefficient indexes while improving performance and stability.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/tidb-index-optimization-best-practices-better-performance\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2025-03-22T19:52:00+00:00","article_modified_time":"2025-03-24T20:41:28+00:00","og_image":[{"width":2400,"height":1254,"url":"https:\/\/static.pingcap.com\/files\/2025\/03\/24124505\/tidb_1200x627-2.png","type":"image\/png"}],"author":"Roger Song","twitter_card":"summary_large_image","twitter_image":"https:\/\/static.pingcap.com\/files\/2025\/03\/24124521\/tidb_twitter_1600x900-2.png","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"Written by":"Roger Song","Est. reading time":"13\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/"},"author":{"name":"Roger Song","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/2c15dfa5c1001589a8eee81137017ee4"},"headline":"TiDB Index Optimization: Detect and Remove Unused Indexes for Better Performance","datePublished":"2025-03-22T19:52:00+00:00","dateModified":"2025-03-24T20:41:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/"},"wordCount":2392,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png","keywords":["Distributed SQL","Index Optimization","Online Schema","System Efficiency","TiDB"],"articleSection":["Product"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/","url":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/","name":"TiDB Index Optimization: Best Practices for Better Performance","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png","datePublished":"2025-03-22T19:52:00+00:00","dateModified":"2025-03-24T20:41:28+00:00","description":"Explore the tools and strategies behind TiDB index optimization to eliminate inefficient indexes while improving performance and stability.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png","width":3600,"height":1200},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/tidb-index-optimization-best-practices-better-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"TiDB Index Optimization: Detect and Remove Unused Indexes for Better Performance"}]},{"@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\/2c15dfa5c1001589a8eee81137017ee4","name":"Roger Song","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/","url":"https:\/\/static.pingcap.com\/files\/2024\/02\/07174739\/roger-song-150x150.jpeg","contentUrl":"https:\/\/static.pingcap.com\/files\/2024\/02\/07174739\/roger-song-150x150.jpeg","caption":"Roger Song"},"description":"TiDB Product Manager","url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/roger-song\/"}]}},"grav_blocks":false,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/tidb-index-optimization-best-practices-better-performance\/\"><div class=\"card-resource__image-container\"><img class=\"card-resource__image\" alt=\"tidb_feature_1800x600 (1)\" src=\"https:\/\/static.pingcap.com\/files\/2025\/03\/24124441\/tidb_feature_1800x600-1-2.png\" loading=\"lazy\" width=3600 height=1200 \/><\/div><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Product<\/div><\/div><h5 class=\"card-resource__title\">TiDB Index Optimization: Detect and Remove Unused Indexes for Better Performance<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/25891","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\/261"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=25891"}],"version-history":[{"count":16,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/25891\/revisions"}],"predecessor-version":[{"id":26002,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/25891\/revisions\/26002"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/25993"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=25891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=25891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=25891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}