oracle 11g not in 与not exists 那个高效?
网络上很多谣言是后面跟小表用not in,后面跟大表用not exists,难道真的是这样子的嘛?
情况下面测试:
1、先用小表测试(1000条记录和一张8万条记录的表):
SQL> create table not_in_s as select * from dba_objects where object_id <= 10000;
Table created.
Elapsed: 00:00:00.17
SQL> create table not_exists_s as select * from dba_objects where object_id <= 10000;
Table created.
查看执行计划:
小表not in
set autotrace traceonly explain
SQL> select * from dba_objects where object_id
not in (select object_id from not_exists_s);
Elapsed: 00:00:00.06
Execution Plan
----------------------------------------------------------
Plan hash value: 566308792
-----------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 87028 | 18M| 337 (1)| 00:00:05 |
|* 1 | HASH JOIN RIGHT ANTI NA | | 87028 | 18M| 337 (1)| 00:00:05 |
| 2 | TABLE ACCESS FULL | NOT_EXISTS_S | 11495 | 145K| 36 (0)| 00:00:01 |
| 3 | VIEW | DBA_OBJECTS | 87036 | 17M| 301 (1)| 00:00:04 |
| 4 | UNION-ALL | | | | | |
|* 5 | TABLE ACCESS BY INDEX ROWID| SUM$ | 1 | 9 | 1 (0)| 00:00:01 |
|* 6 | INDEX UNIQUE SCAN | I_SUM$_1 | 1 | | 0 (0)| 00:00:01 |
| 7 | TABLE ACCESS BY INDEX ROWID| OBJ$ | 1 | 30 | 3 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | I_OBJ1 | 1 | | 2 (0)| 00:00:01 |
|* 9 | FILTER | | | | | |
|* 10 | HASH JOIN | | 87035 | 10M| 299 (2)| 00:00:04 |
| 11 | TABLE ACCESS CLUSTER | USER$ | 92 | 1564 | 3 (0)| 00:00:01 |
| 12 | INDEX FULL SCAN | I_USER# | 1 | | 1 (0)| 00:00:01 |
|* 13 | HASH JOIN | | 87035 | 9009K| 296 (2)| 00:00:04 |
| 14 | INDEX FULL SCAN | I_USER2 | 92 | 2024 | 1 (0)| 00:00:01 |
|* 15 | TABLE ACCESS FULL | OBJ$ | 87035 | 7139K| 294 (1)| 00:00:04 |
| 16 | NESTED LOOPS | | 1 | 29 | 2 (0)| 00:00:01 |
|* 17 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | 1 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | I_OBJ4 | 1 | 9 | 1 (0)| 00:00:01 |
| 19 | NESTED LOOPS | | 1 | 105 | 2 (0)| 00:00:01 |
| 20 | TABLE ACCESS FULL | LINK$ | 1 | 88 | 2 (0)| 00:00:01 |
| 21 | TABLE ACCESS CLUSTER | USER$ | 1 | 17 | 0 (0)| 00:00:01 |
|* 22 | INDEX UNIQUE SCAN | I_USER# | 1 | | 0 (0)| 00:00:01 |
-----------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("OBJECT_ID"="OBJECT_ID")
5 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
6 - access("S"."OBJ#"=:B1)
8 - access("EO"."OBJ#"=:B1)
9 - filter("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8
AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND
"O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88 OR
BITAND("U"."SPARE1",16)=0 OR ("O"."TYPE#"=4 OR "O"."TYPE#"=5 OR "O"."TYPE#"=7 OR
"O"."TYPE#"=8 OR "O"."TYPE#"=9 OR "O"."TYPE#"=10 OR "O"."TYPE#"=11 OR "O"."TYPE#"=12
OR "O"."TYPE#"=13 OR "O"."TYPE#"=14 OR "O"."TYPE#"=22 OR "O"."TYPE#"=87) AND
(SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2 OR
"U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))
OR EXISTS (SELECT 0 FROM SYS."USER$" "U2",SYS."OBJ$" "O2" WHERE
"O2"."OWNER#"="U2"."USER#" AND "O2"."TYPE#"=88 AND "O2"."DATAOBJ#"=:B1 AND
"U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))
)))
10 - access("O"."SPARE3"="U"."USER#")
13 - access("O"."OWNER#"="U"."USER#")
15 - filter("O"."TYPE#"<>10 AND "O"."NAME"<>'_NEXT_OBJECT' AND
"O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL AND
BITAND("O"."FLAGS",128)=0)
17 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current
_edition_id')))
filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current
_edition_id')))
18 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
22 - access("L"."OWNER#"="U"."USER#")
Note
-----
- dynamic sampling used for this statement (level=2)
小表 not exists:
SQL> select * from dba_objects where not exists
(select object_id from not_in_s where not_in_s.object_id = dba_objects.object_id);
Elapsed: 00:00:00.04
Execution Plan
----------------------------------------------------------
Plan hash value: 4002778081
----------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 87027 | 18M| 337 (1)| 00:00:05 |
|* 1 | HASH JOIN RIGHT ANTI | | 87027 | 18M| 337 (1)| 00:00:05 |
| 2 | TABLE ACCESS FULL | NOT_IN_S | 9749 | 123K| 36 (0)| 00:00:01 |
| 3 | VIEW | DBA_OBJECTS | 87036 | 17M| 301 (1)| 00:00:04 |
| 4 | UNION-ALL | | | | | |
|* 5 | TABLE ACCESS BY INDEX ROWID| SUM$ | 1 | 9 | 1 (0)| 00:00:01 |
|* 6 | INDEX UNIQUE SCAN | I_SUM$_1 | 1 | | 0 (0)| 00:00:01 |
| 7 | TABLE ACCESS BY INDEX ROWID| OBJ$ | 1 | 30 | 3 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | I_OBJ1 | 1 | | 2 (0)| 00:00:01 |
|* 9 | FILTER | | | | | |
|* 10 | HASH JOIN | | 87035 | 10M| 299 (2)| 00:00:04 |
| 11 | TABLE ACCESS CLUSTER | USER$ | 92 | 1564 | 3 (0)| 00:00:01 |
| 12 | INDEX FULL SCAN | I_USER# | 1 | | 1 (0)| 00:00:01 |
|* 13 | HASH JOIN | | 87035 | 9009K| 296 (2)| 00:00:04 |
| 14 | INDEX FULL SCAN | I_USER2 | 92 | 2024 | 1 (0)| 00:00:01 |
|* 15 | TABLE ACCESS FULL | OBJ$ | 87035 | 7139K| 294 (1)| 00:00:04 |
| 16 | NESTED LOOPS | | 1 | 29 | 2 (0)| 00:00:01 |
|* 17 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | 1 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | I_OBJ4 | 1 | 9 | 1 (0)| 00:00:01 |
| 19 | NESTED LOOPS | | 1 | 105 | 2 (0)| 00:00:01 |
| 20 | TABLE ACCESS FULL | LINK$ | 1 | 88 | 2 (0)| 00:00:01 |
| 21 | TABLE ACCESS CLUSTER | USER$ | 1 | 17 | 0 (0)| 00:00:01 |
|* 22 | INDEX UNIQUE SCAN | I_USER# | 1 | | 0 (0)| 00:00:01 |
----------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("NOT_IN_S"."OBJECT_ID"="DBA_OBJECTS"."OBJECT_ID")
5 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
6 - access("S"."OBJ#"=:B1)
8 - access("EO"."OBJ#"=:B1)
9 - filter("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8
AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND
"O"."TYPE#"<>14 AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88 OR
BITAND("U"."SPARE1",16)=0 OR ("O"."TYPE#"=4 OR "O"."TYPE#"=5 OR "O"."TYPE#"=7 OR
"O"."TYPE#"=8 OR "O"."TYPE#"=9 OR "O"."TYPE#"=10 OR "O"."TYPE#"=11 OR "O"."TYPE#"=12
OR "O"."TYPE#"=13 OR "O"."TYPE#"=14 OR "O"."TYPE#"=22 OR "O"."TYPE#"=87) AND
(SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"<>2 OR
"U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))
OR EXISTS (SELECT 0 FROM SYS."USER$" "U2",SYS."OBJ$" "O2" WHERE
"O2"."OWNER#"="U2"."USER#" AND "O2"."TYPE#"=88 AND "O2"."DATAOBJ#"=:B1 AND
"U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')
))))
10 - access("O"."SPARE3"="U"."USER#")
13 - access("O"."OWNER#"="U"."USER#")
15 - filter("O"."TYPE#"<>10 AND "O"."NAME"<>'_NEXT_OBJECT' AND
"O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL AND
BITAND("O"."FLAGS",128)=0)
17 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','curren
t_edition_id')))
filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','curren
t_edition_id')))
18 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
22 - access("L"."OWNER#"="U"."USER#")
Note
-----
- dynamic sampling used for this statement (level=2)
1000行记录的小表用not in,not exists 消耗的成本都是337。
2、先用大表测试(5万条记录和一张8万条记录的表):
SQL> create table not_in_b as select * from dba_objects where object_id <= 50000;
create table not_exists_b as select * from dba_objects where object_id <= 50000;
Table created.
Elapsed: 00:00:00.55
SQL>
Table created.
Elapsed: 00:00:00.50
大表not in:
SQL> select * from dba_objects where object_id
not in (select object_id from not_exists_b);
Elapsed: 00:00:00.07
Execution Plan
----------------------------------------------------------
Plan hash value: 3301458141
-------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
-------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 87034 | 18M| | 1445 (1)| 00:00:18 |
|* 1 | HASH JOIN RIGHT ANTI NA | | 87034 | 18M| 1032K| 1445 (1)| 00:00:18 |
| 2 | TABLE ACCESS FULL | NOT_EXISTS_B | 42206 | 535K| | 192 (0)| 00:00:03 |
| 3 | VIEW | DBA_OBJECTS | 87036 | 17M| | 301 (1)| 00:00:04 |
| 4 | UNION-ALL | | | | | | |
|* 5 | TABLE ACCESS BY INDEX ROWID| SUM$ | 1 | 9 | | 1 (0)| 00:00:01 |
|* 6 | INDEX UNIQUE SCAN | I_SUM$_1 | 1 | | | 0 (0)| 00:00:01 |
| 7 | TABLE ACCESS BY INDEX ROWID| OBJ$ | 1 | 30 | | 3 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 2 (0)| 00:00:01 |
|* 9 | FILTER | | | | | | |
|* 10 | HASH JOIN | | 87035 | 10M| | 299 (2)| 00:00:04 |
| 11 | TABLE ACCESS CLUSTER | USER$ | 92 | 1564 | | 3 (0)| 00:00:01 |
| 12 | INDEX FULL SCAN | I_USER# | 1 | | | 1 (0)| 00:00:01 |
|* 13 | HASH JOIN | | 87035 | 9009K| | 296 (2)| 00:00:04 |
| 14 | INDEX FULL SCAN | I_USER2 | 92 | 2024 | | 1 (0)| 00:00:01 |
|* 15 | TABLE ACCESS FULL | OBJ$ | 87035 | 7139K| | 294 (1)| 00:00:04 |
| 16 | NESTED LOOPS | | 1 | 29 | | 2 (0)| 00:00:01 |
|* 17 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | I_OBJ4 | 1 | 9 | | 1 (0)| 00:00:01 |
| 19 | NESTED LOOPS | | 1 | 105 | | 2 (0)| 00:00:01 |
| 20 | TABLE ACCESS FULL | LINK$ | 1 | 88 | | 2 (0)| 00:00:01 |
| 21 | TABLE ACCESS CLUSTER | USER$ | 1 | 17 | | 0 (0)| 00:00:01 |
|* 22 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
-------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("OBJECT_ID"="OBJECT_ID")
5 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
6 - access("S"."OBJ#"=:B1)
8 - access("EO"."OBJ#"=:B1)
9 - filter("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND
"O"."TYPE#"<>9 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14
AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88 OR BITAND("U"."SPARE1",16)=0 OR
("O"."TYPE#"=4 OR "O"."TYPE#"=5 OR "O"."TYPE#"=7 OR "O"."TYPE#"=8 OR "O"."TYPE#"=9 OR
"O"."TYPE#"=10 OR "O"."TYPE#"=11 OR "O"."TYPE#"=12 OR "O"."TYPE#"=13 OR "O"."TYPE#"=14 OR
"O"."TYPE#"=22 OR "O"."TYPE#"=87) AND (SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE'
AND "U"."TYPE#"<>2 OR "U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_
edition_id')) OR EXISTS (SELECT 0 FROM SYS."USER$" "U2",SYS."OBJ$" "O2" WHERE
"O2"."OWNER#"="U2"."USER#" AND "O2"."TYPE#"=88 AND "O2"."DATAOBJ#"=:B1 AND "U2"."TYPE#"=2 AND
"U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))))
10 - access("O"."SPARE3"="U"."USER#")
13 - access("O"."OWNER#"="U"."USER#")
15 - filter("O"."TYPE#"<>10 AND "O"."NAME"<>'_NEXT_OBJECT' AND
"O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL AND
BITAND("O"."FLAGS",128)=0)
17 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition
_id')))
filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition
_id')))
18 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
22 - access("L"."OWNER#"="U"."USER#")
Note
-----
- dynamic sampling used for this statement (level=2)
大表not exists:
SQL> select * from dba_objects where not exists
(select object_id from not_exists_b where not_exists_b.object_id = dba_objects.object_id);
Elapsed: 00:00:00.03
Execution Plan
----------------------------------------------------------
Plan hash value: 465920853
-------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
-------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 87034 | 18M| | 1445 (1)| 00:00:18 |
|* 1 | HASH JOIN RIGHT ANTI | | 87034 | 18M| 1032K| 1445 (1)| 00:00:18 |
| 2 | TABLE ACCESS FULL | NOT_EXISTS_B | 42206 | 535K| | 192 (0)| 00:00:03 |
| 3 | VIEW | DBA_OBJECTS | 87036 | 17M| | 301 (1)| 00:00:04 |
| 4 | UNION-ALL | | | | | | |
|* 5 | TABLE ACCESS BY INDEX ROWID| SUM$ | 1 | 9 | | 1 (0)| 00:00:01 |
|* 6 | INDEX UNIQUE SCAN | I_SUM$_1 | 1 | | | 0 (0)| 00:00:01 |
| 7 | TABLE ACCESS BY INDEX ROWID| OBJ$ | 1 | 30 | | 3 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 2 (0)| 00:00:01 |
|* 9 | FILTER | | | | | | |
|* 10 | HASH JOIN | | 87035 | 10M| | 299 (2)| 00:00:04 |
| 11 | TABLE ACCESS CLUSTER | USER$ | 92 | 1564 | | 3 (0)| 00:00:01 |
| 12 | INDEX FULL SCAN | I_USER# | 1 | | | 1 (0)| 00:00:01 |
|* 13 | HASH JOIN | | 87035 | 9009K| | 296 (2)| 00:00:04 |
| 14 | INDEX FULL SCAN | I_USER2 | 92 | 2024 | | 1 (0)| 00:00:01 |
|* 15 | TABLE ACCESS FULL | OBJ$ | 87035 | 7139K| | 294 (1)| 00:00:04 |
| 16 | NESTED LOOPS | | 1 | 29 | | 2 (0)| 00:00:01 |
|* 17 | INDEX SKIP SCAN | I_USER2 | 1 | 20 | | 1 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | I_OBJ4 | 1 | 9 | | 1 (0)| 00:00:01 |
| 19 | NESTED LOOPS | | 1 | 105 | | 2 (0)| 00:00:01 |
| 20 | TABLE ACCESS FULL | LINK$ | 1 | 88 | | 2 (0)| 00:00:01 |
| 21 | TABLE ACCESS CLUSTER | USER$ | 1 | 17 | | 0 (0)| 00:00:01 |
|* 22 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
-------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("NOT_EXISTS_B"."OBJECT_ID"="DBA_OBJECTS"."OBJECT_ID")
5 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
6 - access("S"."OBJ#"=:B1)
8 - access("EO"."OBJ#"=:B1)
9 - filter("O"."TYPE#"<>4 AND "O"."TYPE#"<>5 AND "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND
"O"."TYPE#"<>9 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND "O"."TYPE#"<>13 AND "O"."TYPE#"<>14
AND "O"."TYPE#"<>22 AND "O"."TYPE#"<>87 AND "O"."TYPE#"<>88 OR BITAND("U"."SPARE1",16)=0 OR
("O"."TYPE#"=4 OR "O"."TYPE#"=5 OR "O"."TYPE#"=7 OR "O"."TYPE#"=8 OR "O"."TYPE#"=9 OR
"O"."TYPE#"=10 OR "O"."TYPE#"=11 OR "O"."TYPE#"=12 OR "O"."TYPE#"=13 OR "O"."TYPE#"=14 OR
"O"."TYPE#"=22 OR "O"."TYPE#"=87) AND (SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE'
AND "U"."TYPE#"<>2 OR "U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_
edition_id')) OR EXISTS (SELECT 0 FROM SYS."USER$" "U2",SYS."OBJ$" "O2" WHERE
"O2"."OWNER#"="U2"."USER#" AND "O2"."TYPE#"=88 AND "O2"."DATAOBJ#"=:B1 AND "U2"."TYPE#"=2 AND
"U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))))
10 - access("O"."SPARE3"="U"."USER#")
13 - access("O"."OWNER#"="U"."USER#")
15 - filter("O"."TYPE#"<>10 AND "O"."NAME"<>'_NEXT_OBJECT' AND
"O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL AND
BITAND("O"."FLAGS",128)=0)
17 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition
_id')))
filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition
_id')))
18 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
22 - access("L"."OWNER#"="U"."USER#")
Note
-----
- dynamic sampling used for this statement (level=2)
5万行记录的小表用not in,not exists 消耗的成本都是1445。
3、结论:
在11g的时候,无论not in 还是not exists,都可以走到Oracle比较先进高效的anti反连接算法;所以网络上的谣言需要慎重分析。
oracle 11g not in 与not exists 那个高效?的更多相关文章
- Oracle 11g RAC 卸载CRS步骤
Oracle 11g之后提供了卸载grid和database的脚本,可以卸载的比较干净,不需要手动删除crs ##########如果要卸载RAC,需要先使用dbca删除数据库,在执行下面的操作### ...
- HOWTO install Oracle 11g on Ubuntu Linux 12.04 (Precise Pangolin) 64bits
安装了Ubuntu 12.04 64bit, 想在上面安装Oracle 11gr2,网上找了好多文档都没成功,最后完全参考了MordicusEtCubitus的文章. 成功安装的关键点:install ...
- Oracle GoldenGate for Oracle 11g to PostgreSQL 9.2.4 Configuration
Installing and setting up Oracle GoldenGate connecting to an Oracle database Also please make sure t ...
- deinstall oracle 11g on linux
deinstall oracle 11g on linux From 11gR2, oracle provide us an deinstall tool. With that now we ca ...
- 解决 Oracle 11g 不能导出空表的问题
--解决 Oracle 11g 不能导出空表的问题 --执行下面语句,查询数据库中的空表,同时产生分配空间.把生成的结果复制出来并执行. select 'alter table '||table_na ...
- Oracle 11g RAC 修改各类IP地址
Oracle 11g RAC 修改各类IP地址 首先,我们都知道Oracle 11g RAC中的IP主要有:Public IP.VIP.SCAN VIP.Private IP这几种. 一般这类改IP地 ...
- ORACLE 11G R2 RAC classical install OGG12.1(LINUX) 经典抽取模式单项同步配置OGG12.1
博文结构图如下: 一.环境描述以及注意事项 1.1 环境简介 IP 系统 Oracle版本 OGG版本 源端 172.16.10.16/36 RHEL6.5 oracle11204 12.1 目标端 ...
- oracle 11g rac R2 for linux change(public,vip)IP ,hostname (oracle 11g rac R2 修改公有,虚拟,私有IP,网卡)
结构如下: 说明: 节点IP,主机名的修改步骤来自ORACLE support文档: 如何修改集群的公网信息(包括 VIP) (文档 ID 1674442.1) 实验环境情况如下: 实验 节点名称 数 ...
- Oracle 11g 单实例到单实例OGG同步实施文档-OGG initial load
Oracle 11g 单实例到单实例OGG同步实施文档-OGG initial load 2018-06-07 00:514730原创GoldenGate 作者: leo 本文链接:https://w ...
随机推荐
- PHP7添加swoole扩展
swoole需要php版本在7.0以上. 1.进入php目录中的bin目录下,通过pecl指令进行安装. cd /usr/local/php7/bin [root@localhost bin]# pw ...
- 再续iOS开发中的这些权限
前言 上篇文章iOS开发中的这些权限,你搞懂了吗?介绍了一些常用权限的获取和请求方法,知道这些方法的使用基本上可以搞定大部分应用的权限访问的需求.但是,这些方法并不全面,不能涵盖住所有权限访问的方法. ...
- Centos7 minimal 系列之桥接模式联网(二)
一.桥接模式联网 之前用NAT模式连接网络,Centos是可以上网,而且Centos可以ping通主机,但是主机ping不通虚拟机.后来发现Nat模式只能由内而外. 1.1设置虚拟机的网络适配器 1. ...
- struts2学习之基础笔记8
文件的上传和下载 上传 步骤1:在文件上传表单中设置method和enctype属性值 格式:<s:form method=”post” enctype =”multipart/ form.da ...
- vue路由钩子拦截器beforeEach和afterEach及页面路由变化路由监听
在路由跳转的时候,我们需要一些权限判断或者其他操作.这个时候就需要使用路由的钩子函数. 定义:路由钩子主要是给使用者在路由发生变化时进行一些特殊的处理而定义的函数. 总体来讲vue里面提供了三大类钩子 ...
- Spring meven 配置
使用maven的仓库化管理,可以更方便有效的控制文件. 在官网下载maven. 官网的地址:http://maven.apache.org/download.cgi 请选择最新的版本下载, 这里我用 ...
- [修改高通平台WIFI MAC 地址] & [adb over wifi]
[修改高通平台WIFI MAC 地址]fccmd --helpfccmd startfccmd getwifimacfccmd setwifimac 74:AC:5F:F5:D7:40 [adb ov ...
- css3背景渐变以及图片混合渲染模式(一)
一.CSS3 渐变(Gradients):CSS3 渐变(gradients)可以让你在两个或多个指定的颜色之间显示平稳的过渡. 以前,你必须使用图像来实现这些效果.但是,通过使用 CSS3 渐变(g ...
- springboot---web 应用开发-文件上传
一.Spring Boot 默认使用 springMVC 包装好的解析器进行上传 二.添加代码 <form method="POST" enctype="multi ...
- vue如何每次打开子组件弹窗都进行初始化
:visible.sync 与 v-if同时使用即可.