I've loaded .tbl files in the tables, now how I can see the total space used on the disk by the database? I'm using Fedora
Asked
Active
Viewed 1,590 times
2 Answers
2
The disk footprint can be assessed using the (Linux) command 'du' on the dbfarm directory or to run the query 'select * from storage();
Source: http://www.monetdb.org/Documentation/Userguide/diskspace

almost smart
- 115
- 6
-
it gives a table with: schema, table, column, type, location, count, type, width, but it doesn't give the size... – Mark Mar 07 '14 at 16:11
-
the easiest way to get the size is by running "du" on the farm directory. if you're unfamiliar with the command, there's a quick overview here: http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ . if you need the size of a particular table (in bytes), you can run a sum over the "columnsize" column in storage(). – almost smart Mar 07 '14 at 22:51
1
You can try as follows:
mclient -d dwh -f tab -s "select location from storage() where table='name_of_a_table';" | xargs -i du -m /var/monetdb5/dbfarm/dwh/bat/{}.tail | cut -f1 | paste -sd+ | bc

echox
- 9,726
- 6
- 33
- 51

Marek Wiewiórka
- 29
- 1
- 2
-
Why only gather the sizes of the tail files? Should the heap and imprint files count as well? – Bouncner Dec 19 '20 at 20:58