alter session set statistics_level=all; select t1.* from t1,t2 where t1.id=t2.id and t1.id<3; select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SQL_ID 4uuk2mdgh036f, child number 0 ------------------------------------- select t1.* from t1,t2 where t1.id=t2.id and t1.id<3 Plan hash value: 1106359941 -------------------------------------------------------------------------------------------------- | Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | -------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | | 131K|00:00:00.34 | 37856 | | 1 | NESTED LOOPS | | 1 | 2 | 131K|00:00:00.34 | 37856 | | 2 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 3 | 131K|00:00:00.11 | 20376 | |* 3 | INDEX RANGE SCAN | T1_IDX1 | 1 | 3 | 131K|00:00:00.04 | 9392 | |* 4 | INDEX RANGE SCAN | T2_IDX1 | 131K| 1 | 131K|00:00:00.17 | 17480 | -------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 3 - access("T1"."ID"<3) 4 - access("T1"."ID"="T2"."ID") filter("T2"."ID"<3) 已选择23行。 SQL> select count(*) from t1 where t1.id<3; COUNT(*) ---------- 131072 A-Rows 真实返回的记录数 E-Rows Oracle预估的返回记录数
Oracle 执行计划了的rows概念
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
SQL Server 执行计划3--关联查询
SQL Server执行计划,多表关联查询
Nested Loops Merge Join Hash Match -
mysql执行计划rows filtered MySQL执行计划优化
1 Explain[1]执行计划Mysql在执行SQL语句时,如何知道表的读取顺序,读取数据类型操作过程,哪些索引被使用到,这些都对SQL调优有着重要的作用.Explain作为查看执行计划的重要工具,分析Explain结果,对SQL调优有重要意义。下面是使用explain 的例子:explain select * from mysql.user;--query result+----+----
explain all 怎么优化 explain type ref mysql explain详解 mysql or优化 mysql 递归查询