This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / ORACLE DBA HELP!!! INDEX DOESN'T WORK.Why didn't my index work well?
ALTER TABLE ADDRESS ADD (
CONSTRAINT ADDRESS_IDX1 PRIMARY KEY (FILE_NO));
SQL> select count(*) FROM ADDRESS
2 WHERE FILE_NO = 4360;
COUNT(*)
----------
1
Execution Plan
---------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (FULL) OF 'ADDRESS'
-hahahaly(hahahaly);
2004-11-2
{421}
(#1961439@0)
-
使用Index是需要加上using index关键字的,否则是默认做全表扫描的,你可以在数据字典中把index名查出来,然后在查询语句中把using index xxx加上,执行计划就应该变成index了
-hard20(hard20);
2004-11-2
(#1961898@0)
-
FT明摆着Full Table Scan的Query要是Oracle用Index的话Oracle公司早倒闭了.
-rhill(阿山);
2004-11-2
(#1961914@0)
-
Thank you. But please don't be FT. It is definitely index scan. :)
-hahahaly(hahahaly);
2004-11-2
(#1961961@0)
-
Sorry, my mistake, my index works well now.
-hahahaly(hahahaly);
2004-11-2
(#1961956@0)
-
Congratulations!
-hard20(hard20);
2004-11-2
(#1961966@0)