数据仓库服务 GAUSSDB(DWS)-其它函数:table_data_skewness(data_row record, locatorType "char")

时间:2024-09-05 10:32:17

table_data_skewness(data_row record, locatorType "char")

描述:计算指定表中列拼接出的record,对应的桶分布索引。

参数:data_row表示指定表中列拼接出的record,locatorType表示分布规则,当前建议指定'H',按hash分布计算。

返回值类型:smallint

示例:

计算tx表中a列拼接的record,按照hash分布规则对应的桶分布索引。

1
2
3
4
5
6
7
8
9
select a, table_data_skewness(row(a), 'H') from tx;
 a | table_data_skewness 
---+---------------------
 3 |                   0
 6 |                   2
 7 |                   2
 4 |                   1
 5 |                   1
(5 rows)
support.huaweicloud.com/sqlreference-830-dws/dws_06_0062.html