Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the query transformations in ORACLE

Shulou Source: shulou.com Published: 2022-05-31 15:24:15 11月15日 Update

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, =, > =

Tags: Views queries complexity costs conditions processing between functions goals but or two content parameters methods learning driving practical deeper interest Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Microsoft Huawei OPPO Reno