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

What are the query transformations in ORACLE

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

Share

Shulou(Shulou.com)05/31 Report--

This article focuses on "what are the query transformations in ORACLE". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn "what are the query transformations in ORACLE"?

1. Sub-query expansion (subquery unnesting)

There are two types of subquery expansion:

1. Either disassemble the table or view in the subquery to join with the outer table

2. either do not open the subquery, but join it to the outer table as an embedded view

Not all subqueries will do subquery expansion, and the conditions for subquery expansion

1. The expanded SQL of the subquery must be completely equivalent to the original SQL.

2. The subquery is not taken apart, but is expanded as a subquery with embedded view, and the rewritten SQL cost should be less than the original SQL.

The where condition before the subquery is one of the following conditions, so if certain conditions are met, the subquery will be expanded.

Single-row (that is, =, > =

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