少年阿賓

          那些青春的歲月

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks
          //oracle解釋執行計劃
          SQL> explain plan for select t.* from abin1 t where t.id<200;
           
          Explained
           
          SQL> select * from table(dbms_xplan.display);
           
          PLAN_TABLE_OUTPUT
          --------------------------------------------------------------------------------
          Plan hash value: 1270356885
          ---------------------------------------------------------------------------
          | Id  | Operation         | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
          ---------------------------------------------------------------------------
          |   0 | SELECT STATEMENT  |       |    98 |  1862 |     2   (0)| 00:00:01 |
          |*  1 |  TABLE ACCESS FULL| ABIN1 |    98 |  1862 |     2   (0)| 00:00:01 |
          ---------------------------------------------------------------------------
          Predicate Information (identified by operation id):
          ---------------------------------------------------
             1 - filter("T"."ID"<200)
           
          13 rows selected
           
          SQL> 


          //mysql解釋執行計劃
          explain select t.* from user_rest t where id<>8 

          //oracle收集表的統計信息
          analyze table abin1 compute statistics;

          posted on 2013-12-28 01:40 abin 閱讀(558) 評論(0)  編輯  收藏 所屬分類: Database
          主站蜘蛛池模板: 来凤县| 花莲县| 长春市| 克什克腾旗| 宽甸| 双柏县| 石楼县| 南华县| 四平市| 潍坊市| 夏河县| 泽普县| 建昌县| 青浦区| 临江市| 黎川县| 鹤壁市| 赤壁市| 甘南县| 山阴县| 元谋县| 高州市| 望奎县| 黄骅市| 涪陵区| 浙江省| 普兰县| 镇江市| 耿马| 凤山县| 赞皇县| 莱阳市| 子洲县| 肃宁县| 洪湖市| 遂溪县| 武威市| 屯门区| 山阴县| 讷河市| 同江市|