Check the execution plan of SQL without using third-party tools
Check the execution plan of SQL without using third-party tools the SQL> connect sys as sysdba –Create the table used by the execution plan SQL> @?\rdbms\admin\utlxplan The Autotrace permission can be granted to each user through the following methods. If you need to limit the Autotrace permission, you can change the authorization to the public to the authorization to a specific user. www.2cto.com 1. Assign all permissions to the plan_table table to the public role SQL> grant all on plan_table to public; 2. Create a role plustrace SQL> create role plustrace; 3. Authorize to the plustrace role SQL> grant select on v_$sesstat to plustrace; SQL> grant select on v_$statname to plustrace; SQL> grant select on v_$session to plustrace; the 4. Authorize the role plstrace to DBA SQL> grant plusrace to dba with admin option; 5. DBA grants authority to public SQL> grant plusrace to public; In this way, users can set the following options in sqlplus SET AUTOTRACE OFF —————- Do not generate AUTOTRACE reports, this is the default mode SET AUTOTRACE ON EXPLAIN —— AUTOTRACE only displays the optimizer execution path report SET AUTOTRACE ON STATISTICS — show only execution statistics SET AUTOTRACE ON —————– Include execution plan and…