I was wondering if there is any way of getting information about how much data is QuestDB taking (ideally also how much data each table is taking) without having to SSH into the instance.
QuestDB has some meta functions that can help with this. The table_storage()
function gives us information about diskSize for each table, as in the results below.
"tableName","walEnabled","partitionBy","partitionCount","rowCount","diskSize"
"AAPL_orderbook",true,"HOUR",16,3024878,2149403527
"trades",true,"DAY",1109,1647651492,54082639056
"trips",true,"MONTH",126,1634599313,261536158948
"weather",false,"NONE",1,137627,9972598
"ethblocks_json",true,"DAY",3328,20688364,28311960478
And we can use the table_partitions(table_name)
to get individual per partition stats, as the sample below
"index","partitionBy","name","minTimestamp","maxTimestamp","numRows","diskSize","diskSizeHuman","readOnly","active","attached","detached","attachable","isParquet","parquetFileSize"
0,"MONTH","2009-01","2009-01-01T00:00:00.000000Z","2009-01-31T23:59:59.000000Z",13748257,2199721128,"2.0 GiB",false,false,true,false,false,false,-1
1,"MONTH","2009-02","2009-02-01T00:00:00.000000Z","2009-02-28T23:59:59.000000Z",13201288,2112206088,"2.0 GiB",false,false,true,false,false,false,-1
2,"MONTH","2009-03","2009-03-01T00:00:00.000000Z","2009-03-31T23:59:58.000000Z",14245594,2279295048,"2.1 GiB",false,false,true,false,false,false,-1
3,"MONTH","2009-04","2009-04-01T00:00:01.000000Z","2009-04-30T23:59:59.000000Z",14149614,2263938248,"2.1 GiB",false,false,true,false,false,false,-1
4,"MONTH","2009-05","2009-05-01T00:00:00.000000Z","2009-05-31T23:59:57.000000Z",14659311,2345489768,"2.2 GiB",false,false,true,false,false,false,-1
5,"MONTH","2009-06","2009-06-01T00:00:00.000000Z","2009-06-30T23:59:59.000000Z",14051305,2248208808,"2.1 GiB",false,false,true,false,false,false,-1
6,"MONTH","2009-07","2009-07-01T00:00:00.000000Z","2009-07-31T23:59:59.000000Z",13498415,2159746408,"2.0 GiB",false,false,true,false,false,false,-1
7,"MONTH","2009-08","2009-08-01T00:00:00.000000Z","2009-08-31T23:59:59.000000Z",13558489,2169358248,"2.0 GiB",false,false,true,false,false,false,-1
8,"MONTH","2009-09","2009-09-01T00:00:00.000000Z","2009-09-30T23:59:59.000000Z",13852893,2216462888,"2.1 GiB",false,false,true,false,false,false,-1
9,"MONTH","2009-10","2009-10-01T00:00:00.000000Z","2009-10-31T23:59:59.000000Z",15463246,2474119368,"2.3 GiB",false,false,true,false,false,false,-1