Maintain table statistics automatically

Database statistics and estimated dispersion statistics are maintained automatically. They are not as accurate as the statistics that the system maintains when you run the GENERATE STATISTICS command. These statistics are, however, generally better than no statistics.

The Netezza Performance Server system maintains certain statistics when you perform database operations.
  • When you use the CREATE TABLE AS command, the system maintains the min/max, null, and estimated dispersion values automatically.
  • When you use the INSERT or UPDATE commands, the system maintains the min/max values for all non-character fields.
  • When you use the GROOM TABLE command to reclaim deleted records, the system leaves the min/max, null, and estimated dispersion values unchanged, and updates the zone map.

    Because the groom process merely physically removes records that were logically deleted, their removal has no effect on any statistics, though it does affect where in the table the remaining records are, hence the effect on zone maps.

The following table describes when the Netezza Performance Server automatically maintains table statistics.

Table 1. Automatic Statistics
Command Row counts Min/Max Null Dispersion (estimated) Zone maps
CREATE TABLE AS yes yes yes yes yes
INSERT yes yes no no yes
DELETE no no no no no
UPDATE yes yes no no yes
GROOM TABLE no no no no yes