This example collects multicolumn statistics on the following column set for the orders table.
- System-derived PARTITION column
- quant_ord
- quant_shpd
COLLECT STATISTICS ON orders COLUMN (quant_ord, PARTITION, quant_shpd);
The database honors the column ordering that you specify. The recommended best practice is to specify the PARTITION as the first column for multicolumn PARTITION statistics. Collecting single-column PARTITION statistics is recommended for partitioned and nonpartitioned tables. However, multicolumn PARTITION statistics are only potentially useful for row partitioned tables.