The fact on system z is, when you CREATE INDEX, you choose the table name by ON keyword. And DB2 defines index space automatically, ie. index is NOT related to tablespace at all and residing in its own physical file.
For DB2 LUW, you must have a tablespace predefined for both the table and any indexes you might add to the table. Therefore all indexes for the table use the same indexspace. When using SMS managed tablespaces, the indexspace has to be the same as the tablespace.
[ 本帖最后由 Pythagoras 于 2009-1-22 09:41 编辑 ]
原帖由 Pythagoras 于 2009-1-22 09:38 发表
The fact on system z is, when you CREATE INDEX, you choose the table name by ON keyword. And DB2 defines index space automatically, ie. index is NOT related to tablespace at all and residing in its own physical file.
For DB2 LUW, you must have a tablespace predefined for both the table and any indexes you might add to the table. Therefore all indexes for the table use the same indexspace. When using SMS managed tablespaces, the indexspace has to be the same as the tablespace.
在create index的时候就没办法再指定存储表空间了
That's true. Index will be put in the tablespace which is defined when the table was created.
syntax:
CREATE TABLE tbname IN tsname1 INDEX IN tsname2
--Specifying which table space will contain a table's index can only be done when the table is created.
CREATE INDEX ixname ON tbname
--No alter index is possible.
[ 本帖最后由 Pythagoras 于 2009-1-22 10:09 编辑 ]