Enabling random chunk distributions

You can enable random distributions that skew the storage for a table to one or a few extents.

About this task

The system.enableRandomDistributionChunkSize system registry variable enables or disables the random chunk distribution feature at the system-wide level. If the value of the system.enableRandomDistributionChunkSize registry variable is yes or on and users specify DISTRIBUTE ON RANDOM when creating tables, the system uses random chunk distribution to store records for the tables. The default value of the system.enableRandomDistributionChunkSize registry variable is no (off).

Depending on the approach that you use, you can enable the random chunk distribution feature temporarily or you can enable it so that it remains in effect after a NPS system restart. To enable the feature temporarily, you must be the admin user or your database account must have permissions to manage the system.

Procedure

To enable the random chunk distribution feature, use one of the following approaches:
  • To enable the feature temporarily, perform the following steps:
    1. Pause the system by issuing the following command:
      nzsystem pause
    2. Set the value of the system.enableRandomDistributionChunkSize registry variable to yes or on by issuing the nzsystem set -arg command. An example follows:
      nzsystem set -arg system.enableRandomDistributionChunkSize=yes
    3. Resume the system by issuing the following command:
      nzsystem resume
  • To enable the feature so that it remains in effect after a NPS system restart, perform the following steps:
    1. Log in to the system as the root user.
    2. Using a text editor such as vi, edit the /nz/data/config/system.cfg file.
    3. Set the value of the system.enableRandomDistributionChunkSize registry variable to yes or on. An example follows:
      system.enableRandomDistributionChunkSize = yes 
    4. Save and close the system.cfg file.
    The changes to the system configuration file take effect the next time that the NPS system restarts.

What to do next

To disable the random chunk distribution feature, you can use the previous steps but set the system.enableRandomDistributionChunkSize registry variable to off or no or remove the variable from the system.cfg file. Alternatively, you can set the enable_random_dist_chunk session variable to no or off (for example, specify set enable_random_dist_chunk = no) to disable the random chunk distribution feature at the session level. The default value of the enable_random_dist_chunk session variable is yes (on). If the value of the system.enableRandomDistributionChunkSize registry variable is no or off, setting the enable_random_dist_chunk session variable to yes or on has no effect.