IN-list iterator (IN-list迭代)
字段有索引,in里有多少个值就执行多少次索引扫描。不管值是否在字段里存在~
SQL> create table t1 as select * from dba_objects;
表已创建。
SQL> create index idx_object_id on t1(object_id);
索引已创建。
SQL> select count(1) from t1 where object_id=1;
COUNT(1)
----------
0
SQL> select object_name,object_id from t1 where object_id in (1,2,3,4,5);
OBJECT_NAME OBJECT_ID
------------------------------ ----------
I_OBJ# 3
CLU$ 5
C_OBJ# 2
TAB$ 4
分析表:
BEGIN
DBMS_STATS.GATHER_TABLE_STATS(ownname => 'HR',
tabname => 't1',
estimate_percent => 30,
method_opt => 'for all columns size repeat',
no_invalidate => FALSE,
degree => 8,
关于IN-LIST迭代
最新推荐文章于 2024-01-29 15:50:48 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)