The information for the derived_stat built-in function in Reference Manual: Building Blocks is incomplete.
The syntax as it currently appears in the reference page is:
derived_stat(object_name | object_id, index_name | index_id, [partition_name | partition_id,] “statistic”)
Replace with the following:
derived_stat("object_name" | object_id, index_name | index_id, ["partition_name" | partition_id,] “statistic”)
The descriptions for partition_name and partition_id have been updated with the following:
partition_name – is the name of the partition, belonging to the specific partition that you are interested in. partition_name is optional. When you use partition_name or partition_id, Adaptive Server returns statistics for the target partition, instead of for the entire object.
partition_id – is an alternative to partition_name, and is the partition ID of the specified object that you are interested in. partition_id is optional.
The Examples section has these two new examples:
Example 4 Selects of the titles table. Selects the data page cluster
ratio for index ID 2, partition ID 960003420, of the titles table.
Note that you can use either "dpcr"
or "data
page cluster ratio"
:
select derived_stat("titles", 2, 960003420, "dpcr")
Example 5 Selects of the titles table. Selects the data page cluster
ratio for index ID 2, partition name titles_ptn1,
of the titles table. Note that you can use either "dpcr"
or "data
page cluster ratio"
:
select derived_stat("titles", 2, "titles_ptn1", "dpcr")