{"id":1026,"date":"2022-10-05T19:42:03","date_gmt":"2022-10-05T11:42:03","guid":{"rendered":"http:\/\/www.licaneku.fun\/?p=1026"},"modified":"2022-10-05T19:42:03","modified_gmt":"2022-10-05T11:42:03","slug":"mysql%e7%b4%a2%e5%bc%95%e4%bc%98%e5%8c%96%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"http:\/\/www.licaneku.fun\/?p=1026","title":{"rendered":"Mysql\u7d22\u5f15\u4f18\u5316\u5206\u6790"},"content":{"rendered":"<p><strong>explain\u67e5\u770b\u6267\u884c\u8ba1\u5212<\/strong><\/p>\n<h2>2.1MySql Query Optimizer<\/h2>\n<p>MySQL\u4e2d\u6709\u4e13\u95e8\u8d1f\u8d23\u4f18\u5316SELECT\u8bed\u53e5\u7684\u4f18\u5316\u5668\u6a21\u5757\uff0c\u4e3b\u8981\u529f\u80fd\uff1a\u901a\u8fc7\u8ba1\u7b97\u5206\u6790\u7cfb\u7edf\u4e2d\u6536\u96c6\u5230\u7684\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e3a\u5ba2\u6237\u7aef\u8bf7\u6c42\u7684Query\u63d0\u4f9b\u4ed6\u8ba4\u4e3a\u6700\u4f18\u7684\u6267\u884c\u8ba1\u5212\uff08\u4ed6\u8ba4\u4e3a\u6700\u4f18\u7684\u6570\u636e\u68c0\u7d22\u65b9\u5f0f\uff0c\u4f46\u4e0d\u89c1\u5f97\u662fDBA\u8ba4\u4e3a\u662f\u6700\u4f18\u7684\uff0c\u8fd9\u90e8\u5206\u6700\u8017\u8d39\u65f6\u95f4\uff09<\/p>\n<h2>2.2. Explain<\/h2>\n<h3>2.2.1.\u662f\u4ec0\u4e48<\/h3>\n<p>\u200b       \u4f7f\u7528EXPLAIN\u5173\u952e\u5b57\u53ef\u4ee5\u6a21\u62df\u4f18\u5316\u5668\u6267\u884cSQL\u67e5\u8be2\u8bed\u53e5\uff0c\u4ece\u800c\u77e5\u9053MySQL\u662f\u5982\u4f55\u5904\u7406\u4f60\u7684SQL\u8bed\u53e5\u7684\u3002\u5206\u6790\u4f60\u7684\u67e5\u8be2\u8bed\u53e5\u6216\u662f\u8868\u7ed3\u6784\u7684\u6027\u80fd\u74f6\u9888.<\/p>\n<h3>2.2.2.\u80fd\u505a\u5565<\/h3>\n<p>\u8868\u7684\u8bfb\u53d6\u987a\u5e8f<\/p>\n<p>\u6570\u636e\u8bfb\u53d6\u64cd\u4f5c\u7684\u64cd\u4f5c\u7c7b\u578b<\/p>\n<p>\u54ea\u4e9b\u7d22\u5f15\u53ef\u4ee5\u4f7f\u7528<\/p>\n<p>\u54ea\u4e9b\u7d22\u5f15\u88ab\u5b9e\u9645\u4f7f\u7528<\/p>\n<p>\u6bcf\u5f20\u8868\u6709\u591a\u5c11\u884c\u88ab\u4f18\u5316\u5668\u67e5\u8be2<\/p>\n<h3>2.2.3.\u600e\u4e48\u73a9<\/h3>\n<p>\u4f7f\u7528Explain+SQL\u8bed\u53e5<\/p>\n<p><img decoding=\"async\" src=\"day02\/4.png\" alt=\"\" \/><\/p>\n<h2>2.3.EXPLAIN\u8f93\u51fa\u9879<\/h2>\n<p>\u6765\u6e90\u4e8e\u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/explain-output.html<\/p>\n<table>\n<thead>\n<tr>\n<th><strong>Column<\/strong><\/th>\n<th><strong>JSON Name<\/strong><\/th>\n<th><strong>Meaning<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>id<\/td>\n<td>select_id<\/td>\n<td>The SELECT  identifier<\/td>\n<\/tr>\n<tr>\n<td>select_type<\/td>\n<td>None<\/td>\n<td>The SELECT  type<\/td>\n<\/tr>\n<tr>\n<td>table<\/td>\n<td>table_name<\/td>\n<td>The table  for the output row<\/td>\n<\/tr>\n<tr>\n<td>partitions<\/td>\n<td>partitions<\/td>\n<td>The  matching partitions<\/td>\n<\/tr>\n<tr>\n<td>type<\/td>\n<td>access_type<\/td>\n<td>The join  type<\/td>\n<\/tr>\n<tr>\n<td>possible_keys<\/td>\n<td>possible_keys<\/td>\n<td>The  possible indexes to choose<\/td>\n<\/tr>\n<tr>\n<td>key<\/td>\n<td>key<\/td>\n<td>The index  actually chosen<\/td>\n<\/tr>\n<tr>\n<td>key_len<\/td>\n<td>key_length<\/td>\n<td>The length  of the chosen key<\/td>\n<\/tr>\n<tr>\n<td>ref<\/td>\n<td>ref<\/td>\n<td>The  columns compared to the index<\/td>\n<\/tr>\n<tr>\n<td>rows<\/td>\n<td>rows<\/td>\n<td>Estimate  of rows to be examined<\/td>\n<\/tr>\n<tr>\n<td>filtered<\/td>\n<td>filtered<\/td>\n<td>Percentage  of rows filtered by table condition<\/td>\n<\/tr>\n<tr>\n<td>Extra<\/td>\n<td>None<\/td>\n<td>Additional  information<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>2.4.  explain\u5404\u5b57\u6bb5\u89e3\u91ca<\/h2>\n<h3>2.4.1\u8868\u73af\u5883\u548c\u6570\u636e\u51c6\u5907<\/h3>\n<pre><code class=\"language-sql line-numbers\">CREATE TABLE t1(id INT(10) AUTO_INCREMENT,content  VARCHAR(100) NULL ,  PRIMARY KEY (id));\n CREATE TABLE t2(id INT(10) AUTO_INCREMENT,content  VARCHAR(100) NULL ,  PRIMARY KEY (id));\n CREATE TABLE t3(id INT(10) AUTO_INCREMENT,content  VARCHAR(100) NULL ,  PRIMARY KEY (id));\n CREATE TABLE t4(id INT(10) AUTO_INCREMENT,content  VARCHAR(100) NULL ,  PRIMARY KEY (id));\n\n INSERT INTO t1(content) VALUES(CONCAT('t1_',FLOOR(1+RAND()*1000))); \n INSERT INTO t2(content) VALUES(CONCAT('t2_',FLOOR(1+RAND()*1000)));  \n INSERT INTO t3(content) VALUES(CONCAT('t3_',FLOOR(1+RAND()*1000)));    \n INSERT INTO t4(content) VALUES(CONCAT('t4_',FLOOR(1+RAND()*1000)));\n\n<\/code><\/pre>\n<h3><strong style=\"color:red\">1\u3001id\u2605<\/strong><\/h3>\n<p>select\u67e5\u8be2\u7684\u5e8f\u5217\u53f7,\u5305\u542b\u4e00\u7ec4\u6570\u5b57\uff0c\u8868\u793a\u67e5\u8be2\u4e2d\u6267\u884cselect\u5b50\u53e5\u6216\u64cd\u4f5c\u8868\u7684\u987a\u5e8f\u3002<\/p>\n<p>\u5b58\u5728\u4e09\u79cd\u60c5\u51b5\uff1a<\/p>\n<p><strong>id\u76f8\u540c<\/strong>\uff0c\u6267\u884c\u987a\u5e8f\u7531\u4e0a\u81f3\u4e0b<\/p>\n<pre><code class=\"language-sql line-numbers\">Explain select * from t1,t2,t3;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/7.png\" alt=\"\" \/><\/p>\n<p><strong>id\u4e0d\u540c\uff1a<\/strong>\u5982\u679c\u662f\u5b50\u67e5\u8be2id\u7684\u5e8f\u53f7\u4f1a\u9012\u589e,id\u503c\u8d8a\u5927\u4f18\u5148\u7ea7\u8d8a\u9ad8,\u8d8a\u5148\u88ab\u6267\u884c<\/p>\n<pre><code class=\"language-sql line-numbers\">explain select t1.id from t1 where t1.id = (select t2.id from t2 where t2.id = (select t3.id from t3 where t3.content='t3_897'));\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/8.png\" alt=\"\" \/><\/p>\n<p>\u7ed3\u8bba\uff1a<\/p>\n<p>id\u76f8\u540c\uff0c\u4e0d\u540c<\/p>\n<p>id\u5982\u679c\u76f8\u540c\uff0c\u53ef\u4ee5\u8ba4\u4e3a\u662f\u4e00\u7ec4\uff0c\u4ece\u4e0a\u5f80\u4e0b\u987a\u5e8f\u6267\u884c\uff1b<\/p>\n<p>id\u4e0d\u540c\uff0cid\u503c\u8d8a\u5927\uff0c\u4f18\u5148\u7ea7\u8d8a\u9ad8\uff0c\u8d8a\u5148\u6267\u884c;<\/p>\n<p><strong>\u5173\u6ce8\u70b9\uff1aid\u53f7\u6bcf\u4e2a\u53f7\u7801\uff0c\u8868\u793a\u4e00\u8d9f\u72ec\u7acb\u7684\u67e5\u8be2\u3002\u4e00\u4e2asql\u7684\u67e5\u8be2\u8d9f\u6570\u8d8a\u5c11\u8d8a\u597d\u3002<\/strong><\/p>\n<h3>2.select_type<\/h3>\n<p><strong>\u67e5\u8be2\u7684\u7c7b\u578b\uff0c\u4e3b\u8981\u662f\u7528\u4e8e\u533a\u522b \u666e\u901a\u67e5\u8be2\u3001\u8054\u5408\u67e5\u8be2\u3001\u5b50\u67e5\u8be2\u7b49\u7684\u590d\u6742\u67e5\u8be2<\/strong><\/p>\n<p>\u6709\u54ea\u4e9b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"image\/10.png\" alt=\"\" \/><\/p>\n<p>1)   SIMPLE<\/p>\n<ul>\n<li>\u7b80\u5355\u7684 select \u67e5\u8be2,\u67e5\u8be2\u4e2d\u4e0d\u5305\u542b\u5b50\u67e5\u8be2\u6216\u8005UNION<\/li>\n<\/ul>\n<pre><code class=\"language-sql line-numbers\">EXPLAIN SELECT * FROM t1;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/12.png\" alt=\"\" \/><\/p>\n<p>2\uff09PRIMARY<\/p>\n<ul>\n<li>\u67e5\u8be2\u4e2d\u82e5\u5305\u542b\u4efb\u4f55\u590d\u6742\u7684\u5b50\u67e5\u8be2\u90e8\u5206\uff0c\u6700\u5916\u5c42\u67e5\u8be2\u5219\u88ab\u6807\u8bb0\u4e3aprimary\n<pre><code class=\"language-sql line-numbers\">EXPLAIN select t1.id from t1 where t1.id = (select t2.id from t2 where t2.id = (select t3.id from t3 where t3.content='t3_897'));\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/14.png\" alt=\"\" \/><\/p>\n<\/li>\n<\/ul>\n<p>3)SUBQUERY<\/p>\n<ul>\n<li>\u5728SELECT\u6216WHERE\u5217\u8868\u4e2d\u5305\u542b\u4e86\u5b50\u67e5\u8be2<\/li>\n<\/ul>\n<pre><code class=\"language-sql line-numbers\">#\u5728where\u540e\nEXPLAIN select t1.id from t1 where t1.id = (select t2.id from t2 where t2.id = (select t3.id from t3 where t3.content='t3_897'));\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/15.png\" alt=\"\" \/><\/p>\n<pre><code class=\"language-sql line-numbers\">#\u5728select\u540e\nexplain SELECT t1.id, (SELECT t2.id from t2  )from t1;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/16.png\" alt=\"\" \/><\/p>\n<p>4)DEPENDENT SUBQUERY<\/p>\n<ul>\n<li>\u5728SELECT\u6216WHERE\u5217\u8868\u4e2d\u5305\u542b\u4e86\u5b50\u67e5\u8be2,\u5b50\u67e5\u8be2\u57fa\u4e8e\u5916\u5c42<\/li>\n<\/ul>\n<pre><code class=\"language-sql line-numbers\">EXPLAIN SELECT * FROM t3 WHERE id = ( SELECT id FROM t2 WHERE content = t3.content);\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/17.png\" alt=\"\" \/><\/p>\n<p>5) UNCACHEABLE SUBQUREY\u3010\u5f53\u524d\u5b50\u67e5\u8be2\u3011<\/p>\n<ul>\n<li>\u8868\u793a\u8fd9\u4e2asubquery\u7684\u67e5\u8be2\u8981\u53d7\u5230<strong>\u5916\u90e8\u7cfb\u7edf\u53d8\u91cf<\/strong>\u7684\u5f71\u54cd<\/li>\n<\/ul>\n<pre><code class=\"language-sql line-numbers\">EXPLAIN SELECT * FROM t3 WHERE id = ( SELECT id FROM t2 WHERE content = @@character_set_server);\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/18.png\" alt=\"\" \/><\/p>\n<p>6)UNION<\/p>\n<ul>\n<li>\u82e5\u7b2c\u4e8c\u4e2aSELECT\u51fa\u73b0\u5728UNION\u4e4b\u540e\uff0c\u5219\u88ab\u6807\u8bb0\u4e3aUNION\uff1b \u82e5UNION\u5305\u542b\u5728FROM\u5b50\u53e5\u7684\u5b50\u67e5\u8be2\u4e2d,\u5916\u5c42SELECT\u5c06\u88ab\u6807\u8bb0\u4e3a\uff1aDERIVED\n<pre><code class=\"language-SQL line-numbers\">EXPLAIN SELECT * FROM (SELECT * FROM t1 UNION SELECT * FROM t2) aa; \n<\/code><\/pre>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"image\/19.png\" alt=\"\" \/><\/p>\n<p>7)UNION RESULT<\/p>\n<ul>\n<li>\u4eceUNION\u8868\u83b7\u53d6\u7ed3\u679c\u7684\u4e34\u65f6\u5b58\u50a8\u8868<\/li>\n<\/ul>\n<pre><code class=\"language-SQL line-numbers\">EXPLAIN SELECT * FROM (SELECT * FROM t1 UNION SELECT * FROM t2) aa; \n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/20.png\" alt=\"\" \/><\/p>\n<h3>3. table<\/h3>\n<p>\u663e\u793a\u8fd9\u4e00\u884c\u7684\u6570\u636e\u662f\u5173\u4e8e\u54ea\u5f20\u8868\u7684<\/p>\n<h3>4. partitions<\/h3>\n<ul>\n<li>\u4ee3\u8868\u5206\u533a\u8868\u4e2d\u7684\u547d\u4e2d\u60c5\u51b5\uff0c\u975e\u5206\u533a\u8868\uff0c\u8be5\u9879\u4e3anull<\/li>\n<\/ul>\n<p>\u8bf4\u767d\u4e86\uff0c\u610f\u601d\u662f\u6307\u5c06\u540c\u4e00\u8868\u4e2d\u4e0d\u540c\u884c\u7684\u8bb0\u5f55\u5206\u914d\u5230\u4e0d\u540c\u7684\u7269\u7406\u6587\u4ef6\u4e2d\u3002\u800c\u8bf4\u767d\u4e86\u51e0\u4e2a\u5206\u533a\u5c31\u6709\u51e0\u4e2a.idb\u6587\u4ef6\u3002<\/p>\n<h3>5. <strong style=\"color:red\">type\u2605<\/strong><\/h3>\n<p><img decoding=\"async\" src=\"image\/21.png\" alt=\"\" \/><\/p>\n<p><strong>5.1.\u8bbf\u95ee\u7c7b\u578b\u6392\u5217<\/strong><\/p>\n<p>type\u663e\u793a\u7684\u662f\u8bbf\u95ee\u7c7b\u578b\uff0c\u662f\u8f83\u4e3a\u91cd\u8981\u7684\u4e00\u4e2a\u6307\u6807\uff0c\u7ed3\u679c\u503c<strong>\u4ece\u6700\u597d\u5230\u6700\u574f\u4f9d\u6b21\u662f<\/strong>\uff1a<\/p>\n<p><strong style=\"color:red\">system <\/strong>> <strong style=\"color:red\">const<\/strong>> <strong style=\"color:red\">eq_ref<\/strong> > <strong style=\"color:red\">ref<\/strong> > fulltext > ref_or_null > index_merge > unique_subquery > index_subquery ><strong style=\"color:red\"> range<\/strong> > <strong style=\"color:red\">index<\/strong> > <strong style=\"color:red\">ALL<\/strong><\/p>\n<p>system>const>eq_ref><strong style=\"color:green\">ref<\/strong>><strong style=\"color:green\">range<\/strong>>index>ALL<\/p>\n<p>\u4e00\u822c\u6765\u8bf4\uff0c\u5f97\u4fdd\u8bc1\u67e5\u8be2\u81f3\u5c11\u8fbe\u5230<strong>range<\/strong>\u7ea7\u522b\uff0c\u6700\u597d\u80fd\u8fbe\u5230<strong>ref<\/strong>\u3002<\/p>\n<p><strong>5.2 \u7c7b\u578b\u4ecb\u7ecd<\/strong><\/p>\n<h4>5.2.1.System<\/h4>\n<p>\u8868\u4ec5\u6709<strong>\u4e00\u884c\u8bb0\u5f55<\/strong>\uff0c\u5fc5\u987b\u662f\u7cfb\u7edf\u8868,\u67e5\u8be2\u8d77\u6765\u975e\u5e38\u8fc5\u901f\u3002<\/p>\n<pre><code class=\"language-sql line-numbers\">explain SELECT * from mysql.proxies_priv WHERE `User`='root';\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/22.png\" alt=\"\" \/><\/p>\n<pre><code class=\"language-sql line-numbers\">explain SELECT * from mysql.proc where db='sys';\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"image\/24.png\" alt=\"\" \/><\/p>\n<h4>5.2.2.const<\/h4>\n<p><strong>\u8be5\u8868\u6700\u591a\u6709\u4e00\u4e2a\u5339\u914d\u7684\u884c<\/strong>\uff0c\u5728\u67e5\u8be2\u5f00\u59cb\u65f6\u8bfb\u53d6\u3002\u56e0\u4e3a\u53ea\u6709\u4e00\u884c\uff0c\u6240\u4ee5\u4f18\u5316\u5668\u7684\u5176\u4ed6\u90e8\u5206\u53ef\u4ee5\u5c06\u8fd9\u4e00\u884c\u4e2d\u7684\u5217\u7684\u503c\u89c6\u4e3a\u5e38\u91cf\u3002<\/p>\n<pre><code class=\"language-sql line-numbers\">explain select * from t1 where id = 1;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/23.png\" alt=\"\" \/><\/p>\n<ul>\n<li>\u8868\u793a\u901a\u8fc7\u7d22\u5f15\u4e00\u6b21\u5c31\u627e\u5230\u4e86,const\u7528\u4e8eprimary key\u6216\u8005unique\u7d22\u5f15\u3002<\/li>\n<li>\u56e0\u4e3a\u53ea\u5339\u914d\u4e00\u884c\u6570\u636e\uff0c\u6240\u4ee5\u5f88\u5feb.\u3002 \u5982\u5c06\u4e3b\u952e\u7f6e\u4e8ewhere\u5217\u8868\u4e2d\uff0cMySQL\u5c31\u80fd\u5c06\u8be5\u67e5\u8be2\u8f6c\u6362\u4e3a\u4e00\u4e2a\u5e38\u91cf<\/li>\n<\/ul>\n<h4>5.2.3.eq_ref<\/h4>\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u7d22\u5f15\u952e\uff0c\u8868\u4e2d\u53ea\u6709\u4e00\u6761\u8bb0\u5f55\u4e0e\u4e4b\u5339\u914d\u3002\u7b80\u5355\u6765\u8bf4\uff0c\u5c31\u662f\u591a\u8868\u8fde\u63a5\u4e2d\u4f7f\u7528<strong>primary key<\/strong>\u6216\u8005 <strong>unique key<\/strong>\u4f5c\u4e3a\u5173\u8054\u6761\u4ef6<\/p>\n<pre><code class=\"language-sql line-numbers\">explain select * from t1,t2 where t1.id = t2.id;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/24.png\" alt=\"\" \/><\/p>\n<h4>5.2.4.ref *<\/h4>\n<p>\u975e\u552f\u4e00\u6027\u7d22\u5f15\u626b\u63cf\uff0c\u8fd4\u56de\u5339\u914d\u67d0\u4e2a\u503c\u7684\u6240\u6709\u884c. \u672c\u8d28\u4e0a\u4e5f\u662f\u4e00\u79cd\u7d22\u5f15\u8bbf\u95ee\uff0c\u5b83\u8fd4\u56de\u6240\u6709\u5339\u914d\u67d0\u4e2a\u5355\u72ec\u503c\u7684\u884c\uff0c\u4f46\u662f\u5b83\u53ef\u80fd\u4f1a\u627e\u5230\u591a\u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u884c\u3002<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\u6765\u8bf4\u660e\u8fd9\u4e24\u4e2a\u533a\u522b\uff1a<\/p>\n<blockquote><p>\n  <strong>\u5148\u8bf4eq_ref:<\/strong><\/p>\n<p>  \u200b      \u8868t1\u5305\u542b\u5217\uff08id,context\uff09,\u5176\u4e2did\u662f\u4e3b\u952e\u3002\u8868t2\u5177\u6709\u76f8\u540c\u7684\u5217\uff08id,content\uff09,\u5176\u4e2did\u662f\u4e3b\u952e.<\/p>\n<p>  \u200b    \u8868A\u5305\u542b\u4ee5\u4e0b\u6570\u636e\uff1b<\/p>\n<p>  \u200b     1 263<\/p>\n<p>  \u200b     2 857<\/p>\n<p>  \u200b    \u8868B\u5305\u542b\u4ee5\u4e0b\u6570\u636e<\/p>\n<p>  \u200b     1 334<\/p>\n<p>  \u200b     2 665<\/p>\n<p>  \u200b     \u800ceq_ref\u4e3at1 t2\u4e4b\u95f4\u7684join:<\/p>\n<p>  \u200b     select * from t1,t2 where t1.id=t2.id;<\/p>\n<p>  \u200b     \u56e0\u4e3a\u5bf9\u4e8e\u8868t1\u4e2d\u626b\u63cf\u7684\u6bcf\u4e00\u884c\uff0c\u8868t2\u4e2d\u53ea\u80fd\u6709\u4e00\u884c\u6ee1\u8db3\u3002**\u56e0\u4e3at2.id\u662f\u72ec\u4e00\u65e0\u4e8c\u7684\u3002 **<\/p>\n<p>  <strong>\u518d\u8c08ref:<\/strong><\/p>\n<p>  \u200b    \u5bf9\u4e8e\u4e0a\u9762\u4e00\u5f20\u8868t1, \u7ed9content\u5efa\u7acb\u7d22\u5f15\u4f46<strong>\u975eUNQIE<\/strong><\/p>\n<p>  1  263<\/p>\n<p>  2  263<\/p>\n<p>  \u90a3\u4e48ref\u4e3at1 t2\u4e4b\u95f4\u7684join:<\/p>\n<p>  select * from t1,t2 where t1.content=t2.content<\/p>\n<p>  \u200b    \u8fd9\u4e2ajoin\u5c31\u6ca1\u6709eq_ref\u7684\u5feb\uff0c\u56e0\u4e3a\u5bf9\u4e8et1\u4e2d\u626b\u63cf\u7684\u7684<strong>\u6bcf\u4e00\u884c<\/strong>\uff0ct2\u8868\u4e2d\u6709\u51e0\u4e2a\u53ef\u80fd\u7684\u884c\u4e0e\u4e4b\u5339\u914d\uff0c<strong>\u56e0\u4e3at2.content\u4e0d\u662f\u552f\u4e00\u7684<\/strong>\u3002\n<\/p><\/blockquote>\n<pre><code class=\"language-sql line-numbers\">alter  table  t2  add index idx_content(content) \n\nEXPLAIN SELECT * FROM t1, t2 WHERE t1.content = t2.content;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/25.png\" alt=\"\" \/><\/p>\n<h4>**5.2.5range ***<\/h4>\n<p><strong>\u53ea\u68c0\u7d22\u7ed9\u5b9a\u8303\u56f4\u7684\u884c<\/strong>\uff0c\u4f7f\u7528\u4e00\u4e2a\u7d22\u5f15\u6765\u9009\u62e9\u6307\u5b9a\u8303\u56f4\u884c<\/p>\n<pre><code class=\"language-sql line-numbers\">explain select * from t2 where id &gt;1 and id &lt;5;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/26.png\" alt=\"\" \/><\/p>\n<h4>5.2.6.index<\/h4>\n<p>\u51fa\u73b0index\u662fsql\u4f7f\u7528\u4e86\u7d22\u5f15\u4f46\u662f\u6ca1\u7528\u901a\u8fc7\u7d22\u5f15\u8fdb\u884c\u8fc7\u6ee4\uff0c\u4e00\u822c\u662f\u4f7f\u7528\u4e86<strong>\u8986\u76d6\u7d22\u5f15<\/strong><\/p>\n<p>index\u4e0eALL\u533a\u522b\u4e3aindex\u7c7b\u578b<strong>\u53ea\u904d\u5386\u7d22\u5f15\u6811<\/strong>\u3002<\/p>\n<p>\u8fd9\u901a\u5e38\u6bd4ALL\u5feb\uff0c\u56e0\u4e3a\u7d22\u5f15\u6587\u4ef6\u901a\u5e38\u6bd4\u6570\u636e\u6587\u4ef6\u5c0f\u3002<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4\u867d\u7136all\u548cIndex\u90fd\u662f\u8bfb\u5168\u8868\uff0c\u4f46index\u662f\u4ece\u7d22\u5f15\u4e2d\u8bfb\u53d6\u7684\uff0c\u800call\u662f\u4ece\u78c1\u76d8\u4e2d\u8bfb\u3002<\/p>\n<pre><code class=\"language-sql line-numbers\">explain select id from t1;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/27.png\" alt=\"\" \/><\/p>\n<h4>5.2.7.all<\/h4>\n<p>Full Table Scan\uff0c\u5c06\u904d\u5386\u5168\u8868\u4ee5\u627e\u5230\u5339\u914d\u7684\u884c<\/p>\n<pre><code class=\"language-sql line-numbers\">explain select * f  rom t1;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/28.png\" alt=\"\" \/><\/p>\n<h3>6. possible_keys<\/h3>\n<p>\u663e\u793a\u53ef\u80fd\u5e94\u7528\u5728\u8fd9\u5f20\u8868\u4e2d\u7684\u7d22\u5f15\uff0c\u4e00\u4e2a\u6216\u591a\u4e2a\u3002 \u67e5\u8be2\u6d89\u53ca\u5230\u7684\u5b57\u6bb5\u4e0a\u82e5\u5b58\u5728\u7d22\u5f15\uff0c\u5219\u8be5\u7d22\u5f15\u5c06\u88ab\u5217\u51fa\uff0c<strong>\u4f46\u4e0d\u4e00\u5b9a\u88ab\u67e5\u8be2\u5b9e\u9645\u4f7f\u7528<\/strong><\/p>\n<p><img decoding=\"async\" src=\"day02\/29.png\" alt=\"\" \/><\/p>\n<h3>7. key<\/h3>\n<p><strong style=\"color:red\">\u5b9e\u9645\u4f7f\u7528\u5230\u7684\u7d22\u5f15\uff0c<\/strong>\u5982\u679c\u4e3anull\uff0c\u5219\u6ca1\u6709\u4f7f\u7528\u7d22\u5f15,\u67e5\u8be2\u4e2d\u5982\u679c\u4f7f\u7528\u4e86\u8986\u76d6\u7d22\u5f15\uff0c\u5219\u8be5\u7d22\u5f15\u4ec5\u51fa\u73b0\u5728key\u5217\u8868\u4e2d\u3002<\/p>\n<pre><code class=\"language-sql line-numbers\"> explain   select t1.id  from t1;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/30.png\" alt=\"\" \/><\/p>\n<h3>8. key_len \u2605<\/h3>\n<p>key_len\u8868\u793a\u7d22\u5f15\u4f7f\u7528\u7684\u5b57\u8282\u6570\uff0c\u6839\u636e\u8fd9\u4e2a\u503c\u53ef\u4ee5\u5224\u65ad\u7d22\u5f15\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u7279\u522b\u662f\u5728\u7ec4\u5408\u7d22\u5f15\u7684\u65f6\u5019\uff0c\u5224\u65ad\u8be5\u7d22\u5f15\u6709\u591a\u5c11\u90e8\u5206\u88ab\u4f7f\u7528\u5230\u975e\u5e38\u91cd\u8981\u3002<strong>\u503c\u8d8a\u5927\u8d8a\u597d<\/strong>\u3002<\/p>\n<p>\u7ed9mydb\u5e93\u4e2d\u7684t_tmp\u8868\u5efa\u7acb\u590d\u5408\u7d22\u5f15<\/p>\n<pre><code class=\"language-sql line-numbers\">create index idx_age_name on t_emp (age,name);\n<\/code><\/pre>\n<pre><code class=\"language-sql line-numbers\">#sql1:\nEXPLAIN SELECT SQL_NO_CACHE * FROM t_emp WHERE t_emp.age=30 AND t_emp.name LIKE 'ab%'; \n#sql2:\nEXPLAIN SELECT SQL_NO_CACHE * FROM t_emp WHERE t_emp.age=30;\n\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/32.png\" alt=\"\" \/><\/p>\n<p>\u7b2c\u4e00\u7ec4\uff1a<\/p>\n<p>key_length=name\u7684\u5b57\u8282\u957f\u5ea6 + age\u7684\u5b57\u8282\u957f\u5ea6=63+5=<strong style=\"color:red\">68<\/strong><\/p>\n<p>\u200b                    name\u5b57\u8282\u957f\u5ea6=20*3+1+2\uff1b<\/p>\n<p>\u200b                    age\u5b57\u8282\u957f\u5ea6=4+1<\/p>\n<p>\u7b2c\u4e8c\u7ec4:<\/p>\n<p>key_length=name\u5b57\u8282\u7684\u957f\u5ea6=<strong style=\"color:red\">5<\/strong><\/p>\n<p><strong>\u5e38\u89c1\u7684\u7c7b\u578b\u4f8b\u5b50\u8bf4\u660e<\/strong>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"day02\/33.png\" alt=\"\" \/><\/p>\n<p><strong>key_len\u7684\u957f\u5ea6\u8ba1\u7b97\u516c\u5f0f<\/strong>:<\/p>\n<p>varchr(10):\u53d8\u957f\u5b57\u6bb5<strong>\u4e14\u5141\u8bb8NULL<\/strong>  = 10 &#42; ( character set\uff1autf8=3,gbk=2,latin1=1)+1(NULL)+2(\u53d8\u957f\u5b57\u6bb5)<\/p>\n<p>varchr(10)\u53d8\u957f\u5b57\u6bb5<strong>\u4e14\u4e0d\u5141\u8bb8NULL<\/strong> = 10 &#42; ( character set\uff1autf8=3,gbk=2,latin1=1)+2(\u53d8\u957f\u5b57\u6bb5)<\/p>\n<p>char(10)\u56fa\u5b9a\u5b57\u6bb5<strong>\u4e14\u5141\u8bb8NULL<\/strong> = 10 &#42; ( character set\uff1autf8=3,gbk=2,latin1=1)+1(NULL)<\/p>\n<p>char(10)\u56fa\u5b9a\u5b57\u6bb5\u4e14<strong>\u4e0d\u5141\u8bb8NULL<\/strong>  = 10 &#42; ( character set\uff1autf8=3,gbk=2,latin1=1)<\/p>\n<h3>9. ref<\/h3>\n<p>\u663e\u793a\u5c06\u54ea\u4e9b\u5217\u6216\u5e38\u91cf\u4e0e\u952e\u5217\u4e2d\u547d\u540d\u7684\u7d22\u5f15\u8fdb\u884c\u6bd4\u8f83\uff0c\u4ee5\u4ece\u8868\u4e2d\u9009\u62e9\u884c\u3002<\/p>\n<p>\u8bf4\u767d\u4e86\u4e00\u53e5\u8bdd <strong>\u7d22\u5f15\u88ab\u7528\u4e8e\u54ea\u4e00\u5217\u3002<\/strong><\/p>\n<pre><code class=\"language-sql line-numbers\">explain select * from t1,t2 where t1.id = t2.id;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/34.png\" alt=\"\" \/><\/p>\n<h3>10.rows<\/h3>\n<p>rows\u5217\u663e\u793aMySQL\u8ba4\u4e3a\u5b83\u6267\u884c\u67e5\u8be2\u65f6\u5fc5\u987b\u68c0\u67e5\u7684\u884c\u6570\u3002\u503c\u8d8a\u5c0f\u8d8a\u597d<\/p>\n<h3>11.filtered<\/h3>\n<p>\u8fd9\u4e2a\u5b57\u6bb5\u8868\u793a\u5b58\u50a8\u5f15\u64ce\u8fd4\u56de\u7684\u6570\u636e\u5728mysql server\u5c42\u8fc7\u6ee4\u540e\uff0c\u5269\u4e0b\u591a\u5c11\u6ee1\u8db3\u67e5\u8be2\u7684\u8bb0\u5f55\u6570\u91cf\u7684\u6bd4\u4f8b\uff0c\u6ce8\u610f\u662f\u767e\u5206\u6bd4\uff0c\u4e0d\u662f\u5177\u4f53\u8bb0\u5f55\u6570<\/p>\n<h3>12.Extra\u2605<\/h3>\n<p>\u5305\u542b\u4e0d\u9002\u5408\u5728\u5176\u4ed6\u5217\u4e2d\u663e\u793a,\u4f46\u5341\u5206\u91cd\u8981\u7684\u989d\u5916\u4fe1\u606f<\/p>\n<h4>12.1. Using filesort *<\/h4>\n<p>\u5982\u679c\u51fa\u73b0Using filesort \u8bf4\u660emysql\u4f1a\u5bf9\u6570\u636e\u4f7f\u7528\u4e00\u4e2a\u5185\u90e8\u8fdb\u884c\u6392\u5e8f\uff0c<strong>\u800c\u4e0d\u662f\u6309\u7167\u8868\u5185\u7684\u7d22\u5f15\u987a\u5e8f\u8fdb\u884c\u8bfb\u53d6<\/strong> \uff0c \u90a3\u4e48MySQL\u4e2d\u65e0\u6cd5\u5229\u7528\u7d22\u5f15\u5b8c\u6210\u7684\u6392\u5e8f\u64cd\u4f5c\u79f0\u4e3a\u201c\u6587\u4ef6\u6392\u5e8f\u201d\u3002<\/p>\n<p>\u53e6\u5916\u521b\u5efa\u8868<strong>t_student<\/strong>\uff0c\u5e76\u6307\u5b9a\u7d22\u5f15<\/p>\n<pre><code class=\"language-sql line-numbers\">create table t_student(id int not null PRIMARY key , age int, height int, name varchar(10),index idx_age(age), index idx_height(height));\n\n<\/code><\/pre>\n<p>\u63d2\u516510\u6761\u6570\u636e<\/p>\n<pre><code class=\"language-sql line-numbers\">INSERT into student values(1,10,170,'A1');\nINSERT into student values(2,20,160,'A2');\nINSERT into student values(3,22,166,'A3');\nINSERT into student values(4,25,165,'A4');\nINSERT into student values(5,25,169,'A5');\nINSERT into student values(6,22,170,'A6');\nINSERT into student values(7,30,170,'A7');\nINSERT into student values(8,40,174,'A8');\nINSERT into student values(9,50,172,'A9');\nINSERT into student values(10,50,177,'A10');\n<\/code><\/pre>\n<pre><code class=\"language-SQL line-numbers\">explain  select * from  t_student  where age=20 order by height;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/35.png\" alt=\"\" \/><\/p>\n<p>\u5982\u4f55\u53bb\u6389filesort\u6392\u5e8f\uff1f<\/p>\n<p>\u4f18\u5316\uff1a<\/p>\n<p><strong style='color:red'>\u7ed9age\u548cheight\u5b57\u6bb5\u5efa\u7acb\u590d\u5408\u7d22\u5f15<\/strong><\/p>\n<pre><code class=\"language-sql line-numbers\">create index idx_age_height on t_student(age,height); \n\n<\/code><\/pre>\n<pre><code class=\"language-sql line-numbers\">explain  select * from  t_student  where age=20 order by height;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/36.png\" alt=\"\" \/><\/p>\n<p>\u5b8c\u7f8e\uff0c\u53bb\u6389using filesort<\/p>\n<p>\u8fc7\u7a0b\uff1a\u56e0\u4e3a\u5efa\u7acb\u4e86\uff08age,height\uff09\u7684\u590d\u5408\u7d22\u5f15\uff0c\u90a3\u4e48\u4e5f\u5373age,height\u662f\u6392\u597d\u5e8f\u7684\uff0c\u5e76\u4e14\u5f53\u5728age\u76f8\u7b49\u4e0b\uff0cheight\u4e5f\u4e00\u5b9a\u662f\u88ab\u987a\u5e8f\u7ec4\u7ec7\u597d\u7684\u3002\u56e0\u6b64\u76f4\u63a5\u6839\u636e\u5728\u590d\u5408\u7d22\u5f15\u6811\u4e0a\u6839\u636e\u4e3b\u952e\u503c\u56de\u8868\u5230\u4e3b\u952e\u7d22\u5f15\u4e0a\u627e\u5230\u76f8\u5e94\u7684\u6570\u636e\u8bb0\u5f55\u3002\u4e0d\u9700\u8981\u5728\u8fdb\u884cmysql\u5185\u90e8\u5728\u8fdb\u884c\u6392\u5e8f\u4e86\u3002<\/p>\n<p>\u5c0f\u603b\u7ed3\uff1a<\/p>\n<p>\u5f53Where \u6761\u4ef6\u548c order by \u5b50\u53e5\u4f5c\u7528\u5728\u4e0d\u540c\u7684\u5217\u4e0a<strong>\uff0c\u5efa\u7acb\u8054\u5408\u7d22\u5f15\u53ef\u4ee5\u907f\u514dUsing filesort\u7684\u4ea7\u751f\u3002<\/strong><\/p>\n<h4>12.2.Using temporary<\/h4>\n<p>\u5982\u679c\u51fa\u73b0\u4e86Using temporary\u60c5\u51b5\uff1a<strong>\u5206\u7ec4\u6ca1\u6709\u7528\u4e0a\u7d22\u5f15<\/strong>\u3002\u4ea7\u751f\u4e34\u65f6\u8868\u3002\u6ce8\u610f\uff1a<strong>\u5206\u7ec4\u64cd\u4f5c\u662f\u9700\u8981\u5148\u6392\u5e8f\u540e\u5206\u7ec4\u7684<\/strong>\u3002\u6240\u4ee5\uff0c\u4e5f\u4f1a\u51fa\u73b0Using filesort\u3002<\/p>\n<pre><code class=\"language-sql line-numbers\">explain SELECT age,count(*) from t_student where height=165 GROUP BY age;\n\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/37.png\" alt=\"\" \/><\/p>\n<p>\u5982\u4f55\u53bb\u6389using temporary?<\/p>\n<p>\u4f18\u5316\uff1a<\/p>\n<p><strong style='color:red'>\u7ed9height\u548cage\u5b57\u6bb5\u5efa\u7acb\u590d\u5408\u7d22\u5f15<\/strong><\/p>\n<pre><code class=\"language-sql line-numbers\">create  index idx_height_age on t_student(height,age);\n<\/code><\/pre>\n<pre><code class=\"language-sql line-numbers\">explain SELECT age,count(*) from t_student where height=165 GROUP BY age;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/38.png\" alt=\"\" \/><\/p>\n<h4>12.3.Using index<\/h4>\n<p>\u8868\u793a\u4f7f\u7528\u4e86<strong>\u8986\u76d6\u7d22\u5f15<\/strong>     [age\u662f\u4e00\u4e2a\u7d22\u5f15]<\/p>\n<pre><code class=\"language-sql line-numbers\">explain select age from t_student where age=20; \n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/39.png\" alt=\"\" \/><\/p>\n<p>\u56e0\u4e3a\u6211\u4eecheight\u4e5f\u662f\u4e00\u4e2a\u7d22\u5f15\u3002\u90a3\u4e48\u5b83\u4e5f\u6ee1\u8db3<\/p>\n<pre><code class=\"language-sql line-numbers\"> explain  select height from t_student  where height=170;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/40.png\" alt=\"\" \/><\/p>\n<p>\u5f53\u7136\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5 Using index \u548c Using where\u540c\u65f6\u5b58\u5728<\/p>\n<p>\u4e3a\u4e86\u6f14\u793a\u6548\u679c\u65b9\u4fbf<\/p>\n<p>\u5220\u9664t_student\u4e2d\u7684idx_age\u3001idx_height\u7d22\u5f15\u3002<\/p>\n<pre><code class=\"language-sql line-numbers\">#\u521b\u5efaage\u3001height\u7684\u590d\u5408\u7d22\u5f15\ncreate index idx_age_height on t_student(age,name)\n<\/code><\/pre>\n<pre><code class=\"language-sql line-numbers\">explain select  age,height from t_student where height=170;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/41.png\" alt=\"\" \/><\/p>\n<p><strong>\u601d\u8003\u4e3a\u4ec0\u4e48\u51fa\u73b0\u4e86using where?<\/strong><\/p>\n<h4>12.4.Using where<\/h4>\n<p>\u200b    \u6ce8\u610f\uff1a\u5f53\u51fa\u73b0using where\u65f6 \u8868\u793a\u6761\u4ef6\u662f\u7531<strong style='color:red'>Mysql server\u5c42<\/strong>\u8fc7\u6ee4\u7684\uff0c\u800c\u4e0d\u662f<strong style='color:red'>\u5b58\u50a8\u5f15\u64ce\u5c42\u8fc7\u6ee4\u7684<\/strong>\u3002<\/p>\n<pre><code class=\"language-sql line-numbers\">#\u5220\u9664\u590d\u5408\u7d22\u5f15\ndrop  index idx_age_height on t_student\n#\u5206\u522b\u5efa\u7acb\u5355\u4e2a\u7d22\u5f15\ncreate index idx_age on t_student(age);\ncreate  index idx_height on t_student(height);\n\n<\/code><\/pre>\n<pre><code class=\"language-sql line-numbers\">explain  select * from t_student where age=20 and name='A10';\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/42.png\" alt=\"\" \/><\/p>\n<p>\u5206\u6790\uff1a\u56e0\u4e3aage\u662f\u7d22\u5f15\u5b57\u6bb5\uff0cname\u4e0d\u662f\u7d22\u5f15\u5b57\u6bb5 \u53ef\u4ee5\u770b\u5230\u8fd9\u91cc\u4e5f\u4f7f\u7528\u4e86\u8fd9\u4e2a\u7d22\u5f15\u3002\u9996\u5148\u5728age\u8fd9\u9897\u7d22\u5f15\u6811\u4e0a\u627e\u5230age=20,\u7136\u540e\u5728\u6839\u636e\u4e3b\u952e\u503c<strong>\u56de\u8868\u5230\u4e3b\u952e\u7d22\u5f15<\/strong>\u6811\u4e0a\u627e\u5230\u8bb0\u5f55\u7136\u540e<strong>\u518d\u6b21\u8fc7\u6ee4<\/strong>\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\u56de\u8868\u67e5\u8be2\u8bb0\u5f55\u4e4b\u540e\u8fdb\u884c\u7684\u8fc7\u6ee4\u5c31<strong style='color:red'>\u4e0d\u662f\u4e8e\u5b58\u50a8\u5f15\u64ce<\/strong>\u505a\u7684\u4e86\uff0c\u800c<strong style='color:red'>\u662fMysql Server<\/strong>\u505a\u7684\u8fc7\u6ee4\u3002<\/p>\n<p>\u6bd4\u5982\u4e0b\u9762\u8fd9\u4e2a\u5c31\u7528\u4e0d\u5230using  where<\/p>\n<pre><code class=\"language-SQL line-numbers\">explain select * from t_student where id=1 and name='A1'\\G;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"day02\/43.png\" alt=\"\" \/><\/p>\n<p>\u603b\u7ed3\uff1a\u5e76\u4e0d\u662f\u5e26\u4e86where\u6761\u4ef6\u5c31\u4e00\u5b9a\u4f1a\u51fa\u73b0using  where\u3002\u800c\u662f\u4e3b\u8981\u770b\u8fc7\u6ee4\u6761\u4ef6\u662f\u5b58\u50a8\u5f15\u64ce\u5b8c\u6210\u7684\uff0c\u8fd8\u662fMysql Server\u5b8c\u6210\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>explain\u67e5\u770b\u6267\u884c\u8ba1\u5212 2.&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1022,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-1026","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-24"],"_links":{"self":[{"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=\/wp\/v2\/posts\/1026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1026"}],"version-history":[{"count":1,"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=\/wp\/v2\/posts\/1026\/revisions"}],"predecessor-version":[{"id":1027,"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=\/wp\/v2\/posts\/1026\/revisions\/1027"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=\/wp\/v2\/media\/1022"}],"wp:attachment":[{"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1026"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.licaneku.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}