ITPub博客

首页 > 数据库 > Oracle > 从dba_extents返回结果为空 - Oracle10g

从dba_extents返回结果为空 - Oracle10g

原创 Oracle 作者:zhyuh 时间:2008-10-10 11:47:43 0 删除 编辑

DBA经常需要用如下SQL来查看某个数据块数据哪个SEGMENT,但是在10g里这句SQL返回结果通常是空的。

select * from dba_extents where file_id=30 and block_id<=1000 and block_id+blocks>=1000;

[@more@]

SOLUTION:

SQL> alter session set "_optimizer_push_pred_cost_based"=false;

Session altered

SQL> select * from dba_extents where file_id=30 and block_id<=1000 and block_id+blocks>=1000;

OWNER SEGMENT_NAME PARTITION_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO
------------------------------ -------------------------------------------------------------------------------- ------------------------------ ------------------ ------------------------------ ---------- ---------- ---------- ---------- ---------- ------------
CTXSYS DR$WAITING TABLE CTXD 0 30 985 131072 16 30

关于参数_optimizer_push_pred_cost_based:uses cost-based query transformation for push pred optimization.
With the presence of the parameter, the CBO would push the join predicates into the view involved in the query.
This pushing of predicate may lead to full table scan instead of doing index access.

Metalink上说有个补丁能解决这个问题,但是一般情况下那个补丁都没用。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/207/viewspace-1011720/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    233
  • 访问量
    2061866