Home | Previous Page | Next Page   Managing Databases > Table Fragmentation Strategies > Distribution Schemes for Table Fragmentation >

System-Defined Hash Distribution Scheme (XPS)

The database server uses a system-defined hash algorithm to distribute data evenly by hashing a specified key. In addition to even data distribution, system-defined hash fragmentation permits the automatic elimination of fragments for queries that use the hashed key. You can use hash fragmentation for several tables to provide fragment elimination when the tables are joined in queries and to perform more processing on the local coserver.

A system-defined hash distribution scheme is the preferred method for distributing data evenly across fragments, except in the following cases:

To specify a system-defined hash distribution scheme, use the FRAGMENT BY HASH clause in the CREATE TABLE statement as follows:

CREATE TABLE new_tab (id INT, name CHAR(30)) 
   FRAGMENT BY HASH (id) IN dbspace1, dbspace2, dbspace3;

In a system-defined hash distribution scheme, specify at least two dbspaces where you want the fragments to be placed or specify a dbslice.

You can also specify a composite key for a system-defined hash distribution scheme.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]