Home> Database> Oracle> body text

What is the difference between in and or in oracle?

WBOY
Release: 2022-01-25 11:31:07
Original
5514 people have browsed it

Difference: 1. in makes a hash connection between the parent query table and the sub-query table, while or performs a loop on the parent query table and then queries the sub-query table; 2. Data without an index The larger the amount, the execution efficiency of in will not drop much, while the execution efficiency of or will drop significantly.

What is the difference between in and or in oracle?

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

What is the difference between in and or in oracle

a in (1,2,3)(a = 1 or a = 2 or a = 3)

a = 1 && b = 2 or a = 3 is equivalent to the union of the conditions of (a = 1 && b =2) and a = 3

or, or if one of the two conditions is met

in is used to include, for example, select * from table in (a statement or several values)

or: satisfy at most two conditions in: satisfy more conditions

The operations are different

1. in: in is a hash connection between the parent query table and the child query table.

2. or: or performs a loop on the parent query table, and queries the child query table each time the loop loops.

Suitable for different

1. in: in is suitable for situations where the child query table has more data than the parent query table.

2. or: or is suitable for situations where the child query table has less data than the parent query table.

What is the difference between in and or in oracle?

Different execution efficiency

1. In: In the absence of an index, as the amount of data behind in increases, the execution efficiency of in will decrease. There will be too big a drop.

2. or: In the absence of an index, as the amount of data behind or increases, the execution efficiency of or will decrease significantly.

Recommended tutorial: "Oracle Video Tutorial"

The above is the detailed content of What is the difference between in and or in oracle?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!