少年阿宾

那些青春的岁月

  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 阅读(537) 评论(0)  编辑  收藏 所属分类: Database

只有注册用户登录后才能发表评论。


网站导航: