stephen
作者stephen·2011-04-14 16:51
系统工程师·

如何通过table的partition number得到table的extent信息

字数 1283阅读 1344评论 0赞 0
如何通过table的partition number得到table的extent信息?

(1)使用如下语句:
    select * from sysptnext
    where pe_partnum = <myPartitionNumber>;
      或
    select *, hex(pe_partnum) hex_partnum from sysptnext
    where hex(pe_partnum) = <myHexPartitionNumber>;
   例如:
    select * from sysptnext
    where pe_partnum = 15728642;
      或
    select *, hex(pe_partnum) hex_partnum from sysptnext
    where hex(pe_partnum) = '0x00F00002';

(2)使用如下语句:
    select * from systabextents
    where te_partnum = <myPartitionNumber>;
      或
    select *, hex(te_partnum) hex_partnum from systabextents
    where hex(te_partnum) = <myHexPartitionNumber>;
   例如:
    select * from systabextents
    where te_partnum = 15728642;
      或
    select *, hex(te_partnum) hex_partnum from systabextents
    where hex(te_partnum) = '0x00F00002';

注1:sysptnext和systabextents都位于sysmaster数据库
注2:systabextents是建立在sysptnext上的view





如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广