数据仓库服务 GAUSSDB(DWS)-函数:pg_obs_file_size(scheme_name.tablename)

时间:2024-06-19 14:33:02

pg_obs_file_size(scheme_name.tablename)

描述:获取OBS上的表或者分区的CU文件名、文件大小信息,仅对列存版本colversion为3的表生效。

返回值类型:record

函数参数字段如下:

名称

类型

描述

scheme_name.tablename

regclass

主表的schema.tablename/tablename/oid,或者分区表的OID。如果存在主表OID和分区OID相同的场景,建议使用表名作为入参。

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--入参为tablename:
SELECT pg_obs_file_size('t2_col_part_obs');
      pg_obs_file_size
----------------------------
 (C1_16777266462721.0,1024)
 (C1_16777266429953.0,1024)
 (C1_16777249734657.0,1024)
 (C1_16777249701889.0,1024)
(4 rows)
--入参为schema.tablename
SELECT pg_obs_file_size('public.t2_col_part_obs');
      pg_obs_file_size
----------------------------
 (C1_16777266462721.0,1024)
 (C1_16777266429953.0,1024)
 (C1_16777249734657.0,1024)
 (C1_16777249701889.0,1024)
(4 rows)
--入参为oid
SELECT pg_obs_file_size(16593);
      pg_obs_file_size
----------------------------
 (C1_16777266462721.0,1024)
 (C1_16777266429953.0,1024)
 (C1_16777249734657.0,1024)
 (C1_16777249701889.0,1024)
(4 rows)
support.huaweicloud.com/devg-dws-v3/dws_16_0012.html