{"id":1250,"date":"2014-06-18T22:44:11","date_gmt":"2014-06-18T14:44:11","guid":{"rendered":"http:\/\/www.yallonking.com\/?p=1250"},"modified":"2014-06-18T22:44:11","modified_gmt":"2014-06-18T14:44:11","slug":"outline%e4%bd%bf%e7%94%a8%e7%ae%80%e4%bb%8b","status":"publish","type":"post","link":"http:\/\/www.yallonking.com\/?p=1250","title":{"rendered":"outline\u4f7f\u7528\u7b80\u4ecb"},"content":{"rendered":"<p>outline\u4f7f\u7528\u7b80\u4ecb<br \/>\n\u4e0b\u8fb9\u7684\u8bed\u53e5\u662f\u5728\u6ca1\u6709\u7d22\u5f15\u7684\u60c5\u51b5\u4e0b\u7684\u6267\u884c\u8ba1\u5212<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; conn yallonking\/yallonking\r\nConnected.\r\nSQL&gt; set autot traceonly\r\nSQL&gt; set line 400\r\nSQL&gt; select * from yallonking where object_id=20;\r\n\r\n\r\nExecution Plan\r\n----------------------------------------------------------\r\nPlan hash value: 2582482548\r\n\r\n--------------------------------------------------------------------------------\r\n| Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |\r\n--------------------------------------------------------------------------------\r\n|   0 | SELECT STATEMENT  |            |     8 |  1416 |   158   (2)| 00:00:02 |\r\n|*  1 |  TABLE ACCESS FULL| YALLONKING |     8 |  1416 |   158   (2)| 00:00:02 |\r\n--------------------------------------------------------------------------------\r\n\r\nPredicate Information (identified by operation id):\r\n---------------------------------------------------\r\n\r\n   1 - filter(&quot;OBJECT_ID&quot;=20)\r\n\r\nNote\r\n-----\r\n   - dynamic sampling used for this statement\r\n\r\n\r\nStatistics\r\n----------------------------------------------------------\r\n        288  recursive calls\r\n          0  db block gets\r\n        795  consistent gets\r\n        684  physical reads\r\n          0  redo size\r\n       1197  bytes sent via SQL*Net to client\r\n        385  bytes received via SQL*Net from client\r\n          2  SQL*Net roundtrips to\/from client\r\n          0  sorts (memory)\r\n          0  sorts (disk)\r\n          1  rows processed\r\n<\/pre>\n<p>\u6211\u4eec\u5c06\u4e00\u4e2a\u6ca1\u6709\u7d22\u5f15\u7684\u67e5\u8be2\u5b58\u50a8\u5728outline\u7684category\u4e2d\t\t  <\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; create or replace outline yallonking for category yallonking on select * from yallonking where object_id=20;\r\n\r\nOutline created.\r\n<\/pre>\n<p>\u521b\u5efa\u4e00\u4e2a\u7d22\u5f15<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; create index idx_yallonking on yallonking(object_id);\r\n\r\nIndex created.\r\n<\/pre>\n<p>\u518d\u6b21\u67e5\u770b\u8be5sql\u6267\u884c\u8ba1\u5212<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; set autot traceonly\r\nSQL&gt; select * from yallonking where object_id=20;\r\n\r\n\r\nExecution Plan\r\n----------------------------------------------------------\r\nPlan hash value: 4208659539\r\n\r\n----------------------------------------------------------------------------------------------\r\n| Id  | Operation                   | Name           | Rows  | Bytes | Cost (%CPU)| Time     |\r\n----------------------------------------------------------------------------------------------\r\n|   0 | SELECT STATEMENT            |                |     1 |   177 |     2   (0)| 00:00:01 |\r\n|   1 |  TABLE ACCESS BY INDEX ROWID| YALLONKING     |     1 |   177 |     2   (0)| 00:00:01 |\r\n|*  2 |   INDEX RANGE SCAN          | IDX_YALLONKING |     1 |       |     1   (0)| 00:00:01 |\r\n----------------------------------------------------------------------------------------------\r\n\r\nPredicate Information (identified by operation id):\r\n---------------------------------------------------\r\n\r\n   2 - access(&quot;OBJECT_ID&quot;=20)\r\n\r\nNote\r\n-----\r\n   - dynamic sampling used for this statement\r\n\r\n\r\nStatistics\r\n----------------------------------------------------------\r\n          9  recursive calls\r\n          0  db block gets\r\n         84  consistent gets\r\n          4  physical reads\r\n          0  redo size\r\n       1201  bytes sent via SQL*Net to client\r\n        385  bytes received via SQL*Net from client\r\n          2  SQL*Net roundtrips to\/from client\r\n          0  sorts (memory)\r\n          0  sorts (disk)\r\n          1  rows processed\r\n<\/pre>\n<p>\u542f\u7528outline category\t\t  <\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; ALTER SESSION SET USE_STORED_OUTLINES = yallonking;\r\n\r\nSession altered.\r\n<\/pre>\n<p>\u518d\u6b21\u67e5\u770b\u8be5sql\u6267\u884c\u8ba1\u5212<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; select * from yallonking where object_id=20;\r\n\r\n\r\nExecution Plan\r\n----------------------------------------------------------\r\nPlan hash value: 2582482548\r\n\r\n--------------------------------------------------------------------------------\r\n| Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |\r\n--------------------------------------------------------------------------------\r\n|   0 | SELECT STATEMENT  |            |   575 |    99K|   158   (2)| 00:00:02 |\r\n|*  1 |  TABLE ACCESS FULL| YALLONKING |   575 |    99K|   158   (2)| 00:00:02 |\t\t\/\/\u6267\u884c\u8ba1\u5212\u4fdd\u6301\u4ee5\u524d\u7684\r\n--------------------------------------------------------------------------------\r\n\r\nPredicate Information (identified by operation id):\r\n---------------------------------------------------\r\n\r\n   1 - filter(&quot;OBJECT_ID&quot;=20)\r\n\r\nNote\r\n-----\r\n   - outline &quot;YALLONKING&quot; used for this statement\t\t\/\/\u6b64\u5904\u4f7f\u7528\u4e86outline category\r\n\r\n\r\nStatistics\r\n----------------------------------------------------------\r\n         35  recursive calls\r\n        123  db block gets\r\n        710  consistent gets\r\n          0  physical reads\r\n        576  redo size\r\n       1197  bytes sent via SQL*Net to client\r\n        385  bytes received via SQL*Net from client\r\n          2  SQL*Net roundtrips to\/from client\r\n          2  sorts (memory)\r\n          0  sorts (disk)\r\n          1  rows processed\r\n<\/pre>\n<p>\u4e0b\u8fb9\u53d6\u6d88outline\uff0c\u6267\u884c\u8ba1\u5212\u6062\u590d\u6b63\u5e38<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; ALTER SESSION SET USE_STORED_OUTLINES = false;\r\n\r\nSession altered.\r\n\t\t  \r\nSQL&gt; select * from yallonking where object_id=20;\r\n\r\n\r\nExecution Plan\r\n----------------------------------------------------------\r\nPlan hash value: 4208659539\r\n\r\n----------------------------------------------------------------------------------------------\r\n| Id  | Operation                   | Name           | Rows  | Bytes | Cost (%CPU)| Time     |\r\n----------------------------------------------------------------------------------------------\r\n|   0 | SELECT STATEMENT            |                |     1 |   177 |     2   (0)| 00:00:01 |\r\n|   1 |  TABLE ACCESS BY INDEX ROWID| YALLONKING     |     1 |   177 |     2   (0)| 00:00:01 |\r\n|*  2 |   INDEX RANGE SCAN          | IDX_YALLONKING |     1 |       |     1   (0)| 00:00:01 |\r\n----------------------------------------------------------------------------------------------\r\n\r\nPredicate Information (identified by operation id):\r\n---------------------------------------------------\r\n\r\n   2 - access(&quot;OBJECT_ID&quot;=20)\r\n\r\nNote\r\n-----\r\n   - dynamic sampling used for this statement\r\n\r\n\r\nStatistics\r\n----------------------------------------------------------\r\n          0  recursive calls\r\n          0  db block gets\r\n          4  consistent gets\r\n          0  physical reads\r\n          0  redo size\r\n       1201  bytes sent via SQL*Net to client\r\n        385  bytes received via SQL*Net from client\r\n          2  SQL*Net roundtrips to\/from client\r\n          0  sorts (memory)\r\n          0  sorts (disk)\r\n          1  rows processed\r\n\r\n<\/pre>\n<p>\u67e5\u770boutline\t  <\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; SELECT NAME, SQL_TEXT \r\n  2    FROM USER_OUTLINES \r\n  3    WHERE CATEGORY=&#039;YALLONKING&#039;;\r\n\r\nNAME                           SQL_TEXT\r\n------------------------------ --------------------------------------------------------------------------------\r\nYALLONKING                     select * from yallonking where object_id=20\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>outline\u4f7f\u7528\u7b80\u4ecb \u4e0b\u8fb9\u7684\u8bed\u53e5\u662f\u5728\u6ca1\u6709\u7d22\u5f15\u7684\u60c5\u51b5\u4e0b\u7684\u6267\u884c\u8ba1\u5212 SQL&gt; conn yallonkin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[87],"tags":[],"_links":{"self":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1250"}],"collection":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1250"}],"version-history":[{"count":2,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1250\/revisions"}],"predecessor-version":[{"id":1252,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1250\/revisions\/1252"}],"wp:attachment":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1250"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}