linux db2表空间目录,DB2目录所在表空间

查看索引所在表空间sql:

--查看索引的表空间id

SELECT TBSPACEIDFROM SYSCAT.INDEXESWHERE INDNAME='A_TEST_INX'

--根据上面查到的id查表空间

select * from sysibm.systablespaces where tbspaceid='3'

=============================================================================

如下是创建表的index in 子句的说明:

INDEX IN tablespace-nameIdentifies the table space in which any indexes on a nonpartitioned table or nonpartitioned indexes on a partitioned table are to be created. The specified table space must exist; it must be a DMS table space if the table has data in DMS table spaces, or an SMS table space if the partitioned table has data in SMS table spaces; it must be a table space on which the authorization ID of the statement holds the USE privilege; and it must be in the same database partition group as tablespace-name (SQLSTATE 42838).

Specifying which table space will contain indexes can be done when a table is created or, in the case of partitioned tables, it can be done by specifying the IN clause of the CREATE INDEX statement for a nonpartitioned index. Checking for the USE privilege on the table space is done at table creation time, not when an index is created later.

For a nonpartitioned index on a partitioned table, storage of the index is as follows:

The table space by the IN clause of the CREATE INDEX statement

The table-level table space specified for the INDEX IN clause of the CREATE TABLE statement

If neither of the preceding are specified, the index is stored in the table space of the first attached or visible data partition(如果前面两个都未指定,则索引存储在第一个附加的或可见的数据分区的表空间中)

For information about partitioned indexes on partitioned tables, see the description of the partition-element INDEX IN clause.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值