//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;