Optimize Oracle SQL using oracle EM Enterprise Manager (automatically generate indexes) # There are a large number of SQL statements in the Application Scenario project, especially when statistical reports are involved, there are many table associations, the index association was not completed during table creation at the beginning, and the query was found to be very low after the table was launched. The EM console provided by Oracle has the automatic optimization function and can provide the optimization solution. I mainly use it to provide the index creation solution. After the application, the SQL query efficiency is greatly improved. I installed oracle 11g # environment for starting EM on my machine. 1. Install and start oracle 11g normally. 2. confirm that the services on the oracle console are started! [Console service] ( http://images.cnitblog.com/blog/84053/201402/141653379239612.jpg ) Then enter the address https://localhost:1158/em Log on to the em Enterprise Manager Console. You can find ## operation procedure ### log on to EM as a normal user (non-DBA) in the Start Menu! [EM logon interface] ( http://images.cnitblog.com/blog/84053/201402/141651144402378.jpg ) ### Go to the function page and find the ** SQL worksheet ** below **! [SQL worksheet] ( http://images.cnitblog.com/blog/84053/201402/141651183117795.jpg ) ### Enter the SQL statement to be optimized in ** SQL command ** on the left and click ** execute ** on the right **! [] ( http://images.cnitblog.com/blog/84053/201402/141651223111484.jpg ) ### After the execution of the scheduling SQL optimization guide, ** scheduling SQL optimization guide ** is displayed on the rightmost side of the result set **! [Scheduling SQL optimization Guide] ( http://images.cnitblog.com/blog/84053/201402/141651280807744.jpg ) ### Submit a solution to open another page and submit it again on this page (PS: The parameters here should be changeable )! [Submit a solution] ( http://images.cnitblog.com/blog/84053/201402/141651314662847.jpg ) ### Select a scheme based on your SQL and database table design. Different schemes are generated. Select a scheme and click implement. Generally, I select ** index **, there may be no need for optimization or other situations .! [Select a solution] ( http://images.cnitblog.com/blog/84053/201402/141651348314407.jpg ) ### Show the SQL statement. I am used to taking the SQL statement out and executing it. It is also convenient to save the record. So I will click ** show SQL ** first **! [Show SQL] ( http://images.cnitblog.com/blog/84053/201402/141651383784024.jpg ) ### Execute the SQL statement and place it in the execution environment for execution, and record it in the modification record! [Execute SQL] ( http://images.cnitblog.com/blog/84053/201402/141651420097370.jpg )