Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
676 views
in Technique[技术] by (71.8m points)

怎么查看一个表总共占用了多少磁盘空间

在DolphinDB中,怎么查看一个分布式表占用了多少磁盘空间?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

可以用下面脚本查看占用空间,库表名请根据实际情况修改,返回结果的单位是byte。

select sum(diskUsage) from pnodeRun(getTabletsMeta{chunkPath="/dbName/%", tableName="tablename", diskUsage=true,top=0})

比如对数据库dfs://STOCK_L2_TAQ下的TAQ表,可以这样查看:

select sum(diskUsage) from pnodeRun(getTabletsMeta{chunkPath="/STOCK_L2_TAQ/%", tableName="TAQ", diskUsage=true,top=0})

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...