当前位置:网站首页>Gbase 8C database object size function (I)
Gbase 8C database object size function (I)
2022-07-28 01:55:00 【Dazhuang twelve】
The database object size function calculates the actual disk space used by the database object .
pg_column_size(any)
describe : The number of bytes required to store a specified value ( May be compressed ).
return type :int
remarks :pg_column_size Displays the space used to store an independent data value .
gbase=# SELECT pg_column_size(1);
pg_column_size
----------------
4
(1 row)
pg_database_size(oid)
describe : Appoint OID Represents the disk space used by the database .
return type :bigint
pg_database_size(name)
describe : Disk space used by the named database .
return type :bigint
remarks :pg_database_size Accept a database OID Or the name , Then return all the disk space used by the object .
Example :
gbase=# SELECT pg_database_size('postgres');
pg_database_size
------------------
30840684
(1 row)
pg_relation_size(oid)
describe : Appoint OID Represents the disk space used by the table or index .
return type :bigint
get_db_source_datasize()
describe : Estimate the total capacity of uncompressed data in the current database .
return type :bigint
remarks :(1) Before calling this function analyze;(2) Calculate the total data capacity of the uncompressed state by estimating the compression ratio of the column storage .
Example :
gbase=# analyze;
ANALYZE
gbase=# select get_db_source_datasize();
get_db_source_datasize
------------------------
31029100
(1 row)
pg_relation_size(text)
describe : Specify the disk space used by the named table or index . Table names can be decorated with schema names .
return type :bigint
pg_relation_size(relation regclass, fork text)
describe : Specify the specified fork tree of the table or index ('main','fsm' or 'vm') Disk space used .
return type :bigint
pg_relation_size(relation regclass)
describe :pg_relation_size(…, 'main') Abbreviation .
return type :bigint
remarks :pg_relation_size Accept a table 、 Indexes 、 Of compressed tables OID Or the name , Then return their byte size .
边栏推荐
- IIC读写EEFPROM
- leetcode: 515. 在每个树行中找最大值
- 【taichi】在太极中画出规整的网格
- The story of the third uncle
- Machine learning how to achieve epidemic visualization -- epidemic data analysis and prediction practice
- 26. Abstraction and template ideas
- Interview question 01.08. Zero matrix
- Understand shader
- Open source flight control (Px4, ardupilot)
- Discussion on PHP using some functions bypass WAF
猜你喜欢

Fiddler 手机抓包代理设置(针对华为荣耀60S)

硬件SPI与软件模拟SPI速率对比

抓包精灵NetCapture APP抓包教程《齐全》

LeetCode高频题128. 最长连续序列,经常被互联网大厂面试考到

牛客网刷题训练(三)

白质脑功能网络图论分析:抑郁症分类和预测的神经标记

Open source flight control (Px4, ardupilot)

ue4 unreal NDisplay插件 简易使用 三折幕 详细...

Data warehouse construction - DWS floor

What is method and methodology: understand the underlying logic of self-improvement
随机推荐
Flink 在 讯飞 AI 营销业务的实时数据分析实践
What is method and methodology: understand the underlying logic of self-improvement
Interview question 01.05. Primary editing
HRD 1. 一个简单而靠谱的HRD的检测方法
小散量化炒股记|量化系统中数据是源头,教你搭建一款普适的数据源框架
HRD 1. a simple and reliable HRD detection method
Data warehouse construction - DWS floor
Oracle RAC cluster file directory migration
Can ordinary equipment access TSN time sensitive network?
N32L43x Flash读\写\擦除操作总结
VLAN实验
Recursion related exercises
阿虎的故事
GBase 8c 注释信息函数
GBase 8c 事务ID和快照(三)
Lambda expressions and stream streams
2.2 comprehensive application questions - sequence table
Realize OCR language recognition demo (II) - display and interaction of pictures and recognition content
After learning the loop, I came across the problem of writing factorial of N, which caused a series of problems, including some common pitfalls for beginners, and how to simplify the code
Collection / container