TAILIEUCHUNG - Oracle SQL Plus The Definitive Guide- P33

Oracle SQL Plus The Definitive Guide- P33:Every day, computer professionals the world over wake up, travel to the office, sit down in front of a computer, and begin another day working with that database called Oracle. Programmers write queries and stored procedures. Database administrators monitor performance, make database changes, and perform other maintenance tasks. Operations people may need to back up or recover a database. | previous page page_288 next page previous page page_289 next page Page 289 The SHOW_PLAN script also returns the overall cost of executing the query. In this example the cost is 21. This number has no meaning in an absolute sense. It s simply a scoring mechanism used by the optimizer to facilitate choosing one plan from many possibilities. You should use it only when comparing two execution plans to see which is more efficient. A plan with a cost of 21 for example would be approximately twice as efficient as a plan with a cost of 42. If you are using the rule-based optimizer the cost will be null. Oracle will use the rule- based optimizer if you have not used the ANALYZE TABLE command to gather statistics for any of the tables involved in the query. Making sense of the results The key to interpreting an execution plan is to understand that the display is hierarchical. A step may consist of one or more child steps and these child steps are shown indented underneath their parent. Executing any given step involves executing all its children so to understand the plan you pretty much have to work your way out from the innermost step. In this example there are three major steps to the plan. First Oracle will join the PROJECT and PROJECT_HOURS tables using a hash join method. Next the results of this join will be joined with the EMPLOYEE table also using a hash join method. Finally the results are sorted on the GROUP BY columns. After the sort the rows are returned as the result of the SELECT statement. Table 8-1 gives a brief description of the various operations together with their options that you may see when querying the plan table. For more detailed information about any of these operations refer to the Oracle8 Server Tuning manual. Table 8-1. EXPLAIN PLAN Operations Operation Options Description AND-EQUAL This step will have two or more child steps each of which returns a set of ROWlDs. The AND-EQUAL operation selects only those ROWIDs that are returned by all the

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.