Number of range buckets

When calculating the range bucket values another variable is the number of range buckets to use. The maximum number of buckets allowed is 39. When determining the optimal number of buckets emurangeupdate uses two pieces of information. The first is the minimum number of buckets that may be used. The default value is 6. You can use the ‑mmin:max option to alter the minimum and maximum number of buckets allocated. For example:

emurangeupdate -m2:15

will allocate a minimum of two and a maximum of fifteen buckets. To determine the number of buckets to use within this range emurangeupdate computes the number of values in the column (the Total value from the data distribution table). It then divides this number by the number of records per bucket value (default value of 5,000) to give the number of buckets to allocate. For example, if a column has 40,000 values, 8 range buckets will be allocated. You can alter the number of records per bucket by specifying the -nrecords option. For example, if we use the following command:

emurangeupdate -m2:15 -n2000

and the column contains 40,000 values, fifteen buckets are allocated (40,000 / 2,000 = 20; however the maximum number of buckets allowed is fifteen via the ‑m2:15 option).

There are two special cases concerning the allocation of buckets. The first is for columns that do not contain any values. In this case only one bucket is allocated. The bucket is used to provide fast searching since any range search specified will not match the indexes; however the indexes can be used as part of the search.

The second case is where a column is part of the server table but is not used in the EMu client. This can occur when clients decide to sub-class standard modules and remove columns they do not require. In this case zero range buckets are allocated.

The following output shows range buckets for an existing column without data and for a column not used by the client:

emurangeupdate eparties:BioMovementStartDate0 eparties:ImaEstimatedDate
Processing eparties...
        Determining range columns...
        Checking registry entries...
        Exporting range data...
        Processing BioMovementStartDate0...
                Range Buckets (distribution)
                =============
                1970-1-1
        Processing ImaEstimatedDate...
                Range Buckets (distribution)
                =============