I am trying to get the total size of all forests that are tied to a specific database.
Using the code below, I have the size of all individual forests, but am stuck on how to achieve a solution:
for $db-id in xdmp:databases() let $db-name := xdmp:database-name($db-id) for $forests in xdmp:forest-status(xdmp:database-forests(xdmp:database($db-name))) let $space := $forests//forest:device-space let $f_name := $forests//forest:forest-name for $stand in $forests//forest:stands let $f_size := fn:sum($stand/forest:stand/forest:disk-size)
source share