Chinaunix

标题: EXPLAIN question [打印本页]

作者: juliey    时间: 2008-04-25 02:19
标题: EXPLAIN question
I created a table and index also created. But when I query by the index column, the EXPLAIN output as "SEQUENTIAL SCAN".

create unique index non_disc_idx1
        on yk_non_disclosure
        (ds_rin);

Please see the attached Screen shot.

Thanks.

Explain.JPG (44.71 KB, 下载次数: 19)

Explain.JPG

作者: liaosnet    时间: 2008-04-25 09:09
update statistics for <tabname>
作者: czw1413_cn    时间: 2008-04-29 11:41
提示: 作者被禁止或删除 内容自动屏蔽
作者: ivhb    时间: 2008-04-29 18:44
原帖由 juliey 于 2008-4-25 02:19 发表
I created a table and index also created. But when I query by the index column, the EXPLAIN output as "SEQUENTIAL SCAN".

create unique index non_disc_idx1
        on yk_non_disclosure
        (ds_rin);
...


there are many ways to resolve this problem:
1,set OPTCOMPIND = 0
2,select {+ index(tabname) } from table tabname ....
3,update statistics
....




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2