Index Support for DGTTs

DB2 UDB v8 gives DBAs the ability to create multiple indexes on DGTTs. Each index that is created will be created in the same table space in which the temporary table resides. (Remember, you have to define a user temporary table space before you can create these types of tables.)

Indexes on DGTTs can be created using the CREATE INDEX statement and dropped using the DROP INDEX statement. Due to the nature of temporary tables, they are implicitly dropped when the session is closed and do not have any persistence in the catalog (they only exist within the duration of a database connection.)

If you create an index on a temporary table, the PUBLIC group is given the INDEX privilege on the table. The qualifier for a DGTT (or ...

Get DB2® Version 8: The Official Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.