Does Oracle have a means to show query execution plans like Sybase 'showplan'? -
i sybase dba/performance optimizer , asked performance of sql queries on oracle , see problems , why slow. there showplan similar sybase? need number of physical i/o's , logical i/o's, table scans , indexes query or stored procedure uses.
i used use embarcadero , don't have anymore.
explain plan and/or autotrace oracle equivalent give possible execution plan oracle use if execute query.
in sqlplus this..
sql> set autotrace traceonly; sql> select * scott.emp; 14 rows selected. execution plan ---------------------------------------------------------- plan hash value: 3956160932 -------------------------------------------------------------------------- | id | operation | name | rows | bytes | cost (%cpu)| time | -------------------------------------------------------------------------- | 0 | select statement | | 14 | 518 | 3 (0)| 00:00:01 | | 1 | table access full| emp | 14 | 518 | 3 (0)| 00:00:01 | -------------------------------------------------------------------------- statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 8 consistent gets 0 physical reads 0 redo size 1415 bytes sent via sql*net client 381 bytes received via sql*net client 2 sql*net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 14 rows processed
here various other options available depending on level of detail , specific scenario..
http://www.oracle-base.com/articles/10g/sqltrace10046trcsessandtkprof10g.php
Comments
Post a Comment