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 ...
随机推荐
- 数据格式与数据类型(Content-Type)
常见数据类型: 文本文件: 二进制文件: 编码后的图像文件: jpeg png 网络中爬取的数据: 1. Content-Type Media Types Type text text/css tex ...
- [JavaEE] Maven简介
转载自:百度 http://baike.baidu.com/view/336103.htm?fr=aladdin 一.简介 Maven是基于项目对象模型(POM),可以通过一小段描述信息来管理项目的构 ...
- Vmware VM共享
打开虚拟机,设置,选项点击共享文件夹 点击启用,将电脑windows的目录添加过来 进入终端即可以进入
- Flask Cookie和Session
1.1.概念 cookie:在网站中,http请求是无状态的.也就是说即使第一次和服务器连接后并且登录成功后,第二次请求服务器依然不能知道当前请求是哪个用户.cookie的出现就是为了解决这个问题,第 ...
- MarkDown 语法备份
标题 标题1 标题2 标题3 标题4 标题5 无序列表 飞雪连天射白鹿 书神侠倚碧鸳 有序列表 飞雪连天射白鹿 笑书神侠倚碧鸳 超链接 百度 图片 粗体和斜体 粗体 斜体 表格 左对齐标题 右对齐标题 ...
- 深度理解DOM事件(实例)
前言 通过如下两个实例来理解DOM事件 实例1--点击别处关闭浮层 onclick与addEventListener的区别 实例2--点击后颜色一层一个层出现的漂亮的彩虹圈 1 实例1--点击别处关 ...
- 跨域-jsonp、cors、iframe、document.domain、postMessage()
同源策略 概念:同源: 协议.域名.端口号 完全相同 同源策略是浏览器的一种安全策略:且浏览器不会将违反同源策略的响应信息返回 http://127.0.0.1:3000/index.html ...
- mySql 使用 SQL 文件脚本 failed to open file 注意事项
1.路径不要有中文,其实最好是全英文 2.路径可以有空格 3.路径两头不要加引号 4.作为一个MySQL命令,source C:/lib/a.sql; 后边的分号是要的. 5.使用 unix 路径风格 ...
- npm run eject 命令后出现This git repository has untracked files or uncommitted changes错误
npm run eject 暴露隐藏的文件,不可逆 结果出现下面的问题 This git repository has untracked files or uncommitted changes: ...
- php版本过低错误导致的laravel 错误:Illuminate\Foundation\helpers.php on line 233; syntax error, unexpected '?'
今天运行laravel项目发现出现错误: Parse error: syntax error, unexpected '?' ..\vendor\laravel\framework\src\Illu ...