Hash access paths Start of change(deprecated)End of change

Db2 can use hash access paths to directly access a single row in a table and avoid scanning the table or index. Start of changeHash-organized table spaces are deprecated and likely to be unsupported in the future.End of change

Deprecated function:

Start of changeFL 504 Hash-organized tables are deprecated. Beginning in Db2 12, packages that are bound with APPLCOMPAT(V12R1M504) or higher cannot create hash-organized tables or alter existing tables to use hash-organization. Existing hash-organized tables remain supported, but they are likely to be unsupported in the future.End of change

Db2 can generate a hash access path from the equal predicate of an SQL statement that fetches only a single row of a table. This access method is faster and more efficient than scanning the table or the index.

Hash access can reduce the query access time and the CPU load for queries that require access to a single row. However, tables that are enabled for hash access might require as much as twice the amount of disk space as tables that are not organized for hash access.

You can enable hash access on tables when you create new table spaces. You can also alter existing tables to enable hash access. However, hash access is available only on universal table spaces that are partitioned by growth or partitioned by range. You can enable hash access on tables that have indexes, but Db2 does not allow hash access on tables on which clustering is enabled.