Specifying Multiple Partitioning Keys in a RANGE Partitioned Table v10
You can often improve performance by specifying multiple key columns for a
RANGE partitioned table. If you often select rows using comparison operators (based on a greater-than or less-than value) on a small set of columns, consider using those columns in
RANGE partitioning rules.
Specifying Multiple Keys in a Range-Partitioned Table
Range-partitioned table definitions may include multiple columns in the partitioning key. To specify multiple partitioning keys for a range-partitioned table, include the column names in a comma-separated list after the
PARTITION BY RANGE clause.
If a table is created with multiple partitioning keys, you must specify multiple key values when querying the table to take full advantage of partition pruning.
Since all rows with a value of
8 in the
sale_month column and a value of
2012 in the
sale_year column will be stored in the
q3_2012 partition, Advanced Server searches only that partition.