Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nested loops for Oracle table joins

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Single table access: sub-table, partition, indexing, full table scan-open parallel, always put it in memory, compression

two。 Multi-table association, only 2 tables can be associated at any time, and the resulting result set can be associated with other tables.

3. Nested loop: Oracle reads a row from a smaller result set (driver table / external table) and compares it one by one with all the data in the larger result set (explored table / internal table) (the nested loop can be used for non-equivalent joins), if the rules are met, it is put into the result set, and then the next piece of data in the smaller result set continues to cycle until the end. Nested loops are only suitable for outputting a small number of result sets or for fast output of result sets. It's actually equivalent to a double-layer FOR loop.

SQL > select * from table (dbms_xplan.display_cursor (null,null,'ALLSTATS LAST')) PLAN_TABLE_OUTPUT- -SQL_ID bv300dy9b7gyn Child number 0--select / * + first_rows * / e.ename.jobred.dname from emp eCodept d wheree.deptno=d.deptno and e.sal

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report