{"id":17650,"date":"2024-06-13T08:49:41","date_gmt":"2024-06-13T15:49:41","guid":{"rendered":"https:\/\/www.pingcap.com\/?post_type=article&#038;p=17650"},"modified":"2024-12-30T00:26:22","modified_gmt":"2024-12-30T08:26:22","slug":"how-to-use-sql-explain-for-better-query-performance","status":"publish","type":"article","link":"https:\/\/www.pingcap.com\/ko\/article\/how-to-use-sql-explain-for-better-query-performance\/","title":{"rendered":"How to Use SQL EXPLAIN for Better Query Performance"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"01dbe254-6b14-4ff3-b500-0ec614a80074\"><span class=\"ez-toc-section\" id=\"Understanding_SQL_EXPLAIN\"><\/span>Understanding SQL EXPLAIN<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1dc16bad-ed24-40ed-a66f-e9e4f45885ba\">What is SQL EXPLAIN?<\/h3>\n\n\n\n<p>SQL EXPLAIN is a powerful tool used in SQL databases to analyze and understand the execution plan of a query without actually executing it. When you prepend an SQL statement with the keyword EXPLAIN, the database returns a detailed description of its execution strategy instead of the actual results. This helps database administrators and developers optimize and troubleshoot SQL queries effectively. For instance, in the context of <a href=\"\/tidb\/\">TiDB<\/a>, a distributed SQL database, the EXPLAIN statement can be invaluable in pinpointing which operations are most resource-intensive and how data flows through the nodes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"64768098-ca52-45f3-8394-f273a38af839\">How SQL EXPLAIN Works<\/h4>\n\n\n\n<p>SQL EXPLAIN works by breaking down the query into its operational components and displaying how the database intends to execute them. It considers various factors, such as table joins, indices, and filtering criteria, and presents this plan in a tabular format. This plan is composed of several key attributes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>id<\/strong>: Unique identifier for each operation.<\/li>\n\n\n\n<li><strong>estRows<\/strong>: Estimated number of rows the operation will process.<\/li>\n\n\n\n<li><strong>task<\/strong>: Specifies where the operation will be executed (e.g., root, cop[tikv], cop[tiflash]).<\/li>\n\n\n\n<li><strong>access object<\/strong>: Displays the table, partition, or index that will be accessed.<\/li>\n\n\n\n<li><strong>operator info<\/strong>: Additional details about each operator.<\/li>\n<\/ul>\n\n\n\n<p>For example, in TiDB, the output might show which tasks are performed on the TiDB server and which are distributed across the TiKV or TiFlash nodes, providing insights into the parallelism of query execution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3a4b7e47-9084-4f2e-9745-8da22f20e0eb\">Benefits of Using SQL EXPLAIN<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"fe2e0be8-01ad-4438-8cd5-14b14bb66fef\">Query Optimization<\/h4>\n\n\n\n<p>The primary benefit of using SQL EXPLAIN is query optimization. By understanding how a query is executed, you can identify bottlenecks and inefficiencies. For example, seeing a full table scan instead of an index scan might indicate that an index is missing or not being used effectively. In such cases, adding the appropriate index can significantly improve query performance.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"b0a293f6-32bf-4585-af93-46c00be3e412\">Performance Insights<\/h4>\n\n\n\n<p>SQL EXPLAIN provides profound insights into query performance by revealing the inner workings of query execution. This allows you to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Identify Slow Operations<\/strong>: Recognize which parts of your query require the most time and resources.<\/li>\n\n\n\n<li><strong>Optimize Resource Utilization<\/strong>: Ensure that the database uses indexes, joins, and aggregations efficiently.<\/li>\n\n\n\n<li><strong>Benchmarking and Monitoring<\/strong>: Compare execution plans over time to monitor the impact of changes in your database or application.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"10fd69d3-2b96-4f22-9983-7527c5c146ea\"><span class=\"ez-toc-section\" id=\"Using_SQL_EXPLAIN_for_Optimization\"><\/span>Using SQL EXPLAIN for Optimization<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"0189e27d-4362-4226-92de-a97cb83315a1\">Steps to Use SQL EXPLAIN<\/h3>\n\n\n\n<p><strong>1.Writing the EXPLAIN Statement<\/strong><\/p>\n\n\n\n<p>Writing an EXPLAIN statement involves simply prepending your SQL query with the keyword EXPLAIN. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN SELECT * FROM t WHERE a = 1;\n<\/code><\/pre>\n\n\n\n<p>The statement does not execute the query but returns the execution plan, which provides valuable insights.<\/p>\n\n\n\n<p><strong>2.Interpreting the Output<\/strong><\/p>\n\n\n\n<p>Interpreting the output of an EXPLAIN statement requires understanding the key attributes. Let&#8217;s break down a basic example in TiDB:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN SELECT * FROM t WHERE a = 1;\n\n+-------------------------------+---------+-----------+---------------------+---------------------------------------------+\n| id                            | estRows | task      | access object       | operator info                               |\n+-------------------------------+---------+-----------+---------------------+---------------------------------------------+\n| IndexLookUp_10                | 10.00   | root      |                     |                                             |\n| \u251c\u2500IndexRangeScan_8(Build)     | 10.00   | cop&#91;tikv] | table:t, index:a(a) | range:&#91;1,1], keep order:false, stats:pseudo |\n| \u2514\u2500TableRowIDScan_9(Probe)     | 10.00   | cop&#91;tikv] | table:t             | keep order:false, stats:pseudo              |\n+-------------------------------+---------+-----------+---------------------+---------------------------------------------+<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>IndexLookUp_10<\/strong>: Indicates an Index Lookup operation.<\/li>\n\n\n\n<li><strong>estRows<\/strong>: Estimated number of rows (10 in this case).<\/li>\n\n\n\n<li><strong>task<\/strong>: Indicates operations executed by the TiDB server (root) and TiKV nodes (cop[tikv]).<\/li>\n\n\n\n<li><strong>access object<\/strong>: Table and index used.<\/li>\n\n\n\n<li><strong>operator info<\/strong>: Additional details (e.g., index range, order preservation).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ac37b795-1bbe-4346-bd54-b6c513f0cac2\">Practical Examples<\/h3>\n\n\n\n<p><strong>Example with SELECT Statement<\/strong><\/p>\n\n\n\n<p>Suppose you want to select trips from a bike-sharing database taken on July 1, 2017:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN SELECT count(*) FROM trips WHERE start_date BETWEEN '2017-07-01 00:00:00' AND '2017-07-01 23:59:59';\n\n+------------------------------+----------+-----------+---------------+------------------------------------------------------------------------------------------------------------------------+\n| id                           | estRows  | task      | access object | operator info                                                                                                          |\n+------------------------------+----------+-----------+---------------+------------------------------------------------------------------------------------------------------------------------+\n| StreamAgg_20                 | 1.00     | root      |               | funcs:count(Column#13)-&gt;Column#11                                                                                      |\n| \u2514\u2500TableReader_21             | 1.00     | root      |               | data:StreamAgg_9                                                                                                       |\n|   \u2514\u2500StreamAgg_9              | 1.00     | cop&#91;tikv] |               | funcs:count(1)-&gt;Column#13                                                                                              |\n|     \u2514\u2500Selection_19           | 250.00   | cop&#91;tikv] |               | ge(bikeshare.trips.start_date, 2017-07-01 00:00:00.000000), le(bikeshare.trips.start_date, 2017-07-01 23:59:59.000000) |\n|       \u2514\u2500TableFullScan_18     | 10000.00 | cop&#91;tikv] | table:trips   | keep order:false, stats:pseudo                                                                                         |\n+------------------------------+----------+-----------+---------------+------------------------------------------------------------------------------------------------------------------------+\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Selection_19<\/strong>: Filters trips by the specified date range.<\/li>\n\n\n\n<li><strong>StreamAgg_20<\/strong>: Aggregates results to count the rows.<\/li>\n<\/ul>\n\n\n\n<p>This output helps identify that the query can be optimized by implementing appropriate indexing strategies.<\/p>\n\n\n\n<p><strong>Example with JOIN Operations<\/strong><\/p>\n\n\n\n<p>Consider a more complex scenario involving JOINs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.id = b.id;\n\n+----------------------------------------+---------+--------------+---------------+------------------------------------------------+\n| id                                     | estRows | task         | access object | operator info                                  |\n+----------------------------------------+---------+--------------+---------------+------------------------------------------------+\n| StreamAgg_15                           | 1.00    | root         |               | funcs:count(1)-&gt;Column#7                       |\n| \u2514\u2500TableReader_47                       | 9.00    | root         |               | data:ExchangeSender_46                         |\n|   \u2514\u2500ExchangeSender_46                  | 9.00    | cop&#91;tiflash] |               | ExchangeType: PassThrough                      |\n|     \u2514\u2500HashJoin_43                      | 9.00    | cop&#91;tiflash] |               | inner join, equal:&#91;eq(test.t1.id, test.t1.id)] |\n|       \u251c\u2500ExchangeReceiver_20(Build)     | 6.00    | cop&#91;tiflash] |               |                                                |\n|       \u2502 \u2514\u2500ExchangeSender_19            | 6.00    | cop&#91;tiflash] |               | ExchangeType: Broadcast                        |\n|       \u2502   \u2514\u2500Selection_18               | 6.00    | cop&#91;tiflash] |               | not(isnull(test.t1.id))                        |\n|       \u2502     \u2514\u2500TableFullScan_17         | 6.00    | cop&#91;tiflash] | table:a       | keep order:false                               |\n|       \u2514\u2500Selection_22(Probe)            | 6.00    | cop&#91;tiflash] |               | not(isnull(test.t1.id))                        |\n|         \u2514\u2500TableFullScan_21             | 6.00    | cop&#91;tiflash] | table:b       | keep order:false                               |\n+----------------------------------------+---------+--------------+---------------+------------------------------------------------+\n<\/code><\/pre>\n\n\n\n<p>Here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>HashJoin_43<\/strong>: Indicates that a hash join operation is used.<\/li>\n\n\n\n<li><strong>ExchangeSender_46<\/strong>: Sends data between nodes using the PassThrough exchange type.<\/li>\n\n\n\n<li><strong>Selection_18<\/strong> and <strong>Selection_22<\/strong>: Filter out NULL values in the join condition.<\/li>\n<\/ul>\n\n\n\n<p>By analyzing this output, you can determine whether the join strategy used is optimal and whether other approaches, such as index joins or nested loops, might be more efficient.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"77c66eda-038a-4591-bc09-549609d11b21\"><span class=\"ez-toc-section\" id=\"Advanced_Tips_and_Best_Practices\"><\/span>Advanced Tips and Best Practices<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2568e7c2-6664-4132-9f11-30c2637911ab\">Common Pitfalls<\/h3>\n\n\n\n<p><strong>Misinterpretation of Results<\/strong><\/p>\n\n\n\n<p>One common pitfall is misinterpreting the results of an EXPLAIN output. It&#8217;s crucial to understand that the presence of an index lookup or hash join does not guarantee optimal performance in every context. Always consider the specific data distribution and query patterns in your database.<\/p>\n\n\n\n<p><strong>Ignoring Execution Environment<\/strong><\/p>\n\n\n\n<p>Another common mistake is ignoring the execution environment. The performance of a query can vary based on the database&#8217;s hardware, network latency, and concurrent workloads. Therefore, it&#8217;s essential to consider the broader execution context when interpreting EXPLAIN results.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"568e35d0-4ff3-4823-8170-34802a875488\">Best Practices<\/h3>\n\n\n\n<p><strong>Regular Use of EXPLAIN<\/strong><\/p>\n\n\n\n<p>Regular use of EXPLAIN is a best practice for maintaining database performance. By incorporating EXPLAIN into your development workflow, you can proactively identify and address performance issues before they impact your application.<\/p>\n\n\n\n<p><strong>Combining with Other Tools<\/strong><\/p>\n\n\n\n<p>EXPLAIN should be used in conjunction with other diagnostic tools. For example, combining EXPLAIN with EXPLAIN ANALYZE in TiDB provides runtime information alongside the execution plan, offering a complete picture of query performance:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN ANALYZE SELECT * FROM t1;\n<\/code><\/pre>\n\n\n\n<p>This command executes the query and provides actual runtime statistics, allowing you to compare expected performance with actual results.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"858fd897-76f5-4f9d-9e4b-3452e2701bc2\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Using SQL EXPLAIN effectively can significantly enhance your ability to optimize and troubleshoot SQL queries. By understanding how SQL EXPLAIN works, interpreting its output correctly, and incorporating best practices, you can ensure that your database queries run efficiently and reliably. In the context of distributed SQL databases like TiDB, leveraging SQL EXPLAIN is crucial for maintaining optimal performance and managing resources across the cluster. Regularly analyzing and tuning your queries using EXPLAIN will lead to a more responsive and robust database environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understanding SQL EXPLAIN What is SQL EXPLAIN? SQL EXPLAIN is a powerful tool used in SQL databases to analyze and understand the execution plan of a query without actually executing it. When you prepend an SQL statement with the keyword EXPLAIN, the database returns a detailed description of its execution strategy instead of the actual [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"template":"","class_list":["post-17650","article","type-article","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Use SQL EXPLAIN for Better Query Performance<\/title>\n<meta name=\"description\" content=\"SQL EXPLAIN works by breaking down the query into its operational components and displaying how the database intends to execute them.\" \/>\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\/article\/how-to-use-sql-explain-for-better-query-performance\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use SQL EXPLAIN for Better Query Performance\" \/>\n<meta property=\"og:description\" content=\"SQL EXPLAIN works by breaking down the query into its operational components and displaying how the database intends to execute them.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/article\/how-to-use-sql-explain-for-better-query-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-30T08:26:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2024\/09\/11005522\/Homepage-Ad.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"714\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data1\" content=\"6\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/\",\"url\":\"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/\",\"name\":\"How to Use SQL EXPLAIN for Better Query Performance\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"datePublished\":\"2024-06-13T15:49:41+00:00\",\"dateModified\":\"2024-12-30T08:26:22+00:00\",\"description\":\"SQL EXPLAIN works by breaking down the query into its operational components and displaying how the database intends to execute them.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/www.pingcap.com\/article\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Use SQL EXPLAIN for Better Query 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\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use SQL EXPLAIN for Better Query Performance","description":"SQL EXPLAIN works by breaking down the query into its operational components and displaying how the database intends to execute them.","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\/article\/how-to-use-sql-explain-for-better-query-performance\/","og_locale":"ko_KR","og_type":"article","og_title":"How to Use SQL EXPLAIN for Better Query Performance","og_description":"SQL EXPLAIN works by breaking down the query into its operational components and displaying how the database intends to execute them.","og_url":"https:\/\/www.pingcap.com\/ko\/article\/how-to-use-sql-explain-for-better-query-performance\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_modified_time":"2024-12-30T08:26:22+00:00","og_image":[{"width":1440,"height":714,"url":"https:\/\/static.pingcap.com\/files\/2024\/09\/11005522\/Homepage-Ad.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@PingCAP","twitter_misc":{"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"6\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/","url":"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/","name":"How to Use SQL EXPLAIN for Better Query Performance","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"datePublished":"2024-06-13T15:49:41+00:00","dateModified":"2024-12-30T08:26:22+00:00","description":"SQL EXPLAIN works by breaking down the query into its operational components and displaying how the database intends to execute them.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/article\/how-to-use-sql-explain-for-better-query-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/www.pingcap.com\/article\/"},{"@type":"ListItem","position":3,"name":"How to Use SQL EXPLAIN for Better Query 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"]}]}},"card_markup":"        <a class=\"card-article\" href=\"https:\/\/www.pingcap.com\/ko\/article\/how-to-use-sql-explain-for-better-query-performance\/\">            <h3>How to Use SQL EXPLAIN for Better Query Performance<\/h3>            <p>Understanding SQL EXPLAIN What is SQL EXPLAIN? SQL EXPLAIN is a powerful tool used in SQL databases to analyze and understand the execution plan of a query without actually executing it. When you prepend an SQL statement with the keyword EXPLAIN, the database returns a detailed description of its execution strategy instead of the actual [&hellip;]<\/p>        <\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/article\/17650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/8"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=17650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}