code: public long getWorkspaceDataSize() throws RepositoryException
     {
        long dataSize = 0;
  
        ResultSet result = null;
        try
        {
           result = findWorkspaceDataSize();
           try
           {
              if (result.next())
              {
                 dataSize += result.getLong(1);
              }
           }
           finally
           {
              JDBCUtils.freeResources(result, null, null);
           }
  
           result = findWorkspacePropertiesOnValueStorage();
           try
           {
              while (result.next())
              {
                 String storageDesc = result.getString(DBConstants.COLUMN_VSTORAGE_DESC);
                 String propertyId = result.getString(DBConstants.COLUMN_VPROPERTY_ID);
                 int orderNum = result.getInt(DBConstants.COLUMN_VORDERNUM);
  
                 ValueIOChannel channel = containerConfig.valueStorageProvider.getChannel(storageDesc);
  
                 dataSize += channel.getValueSize(getIdentifier(propertyId), orderNum);
              }
           }
           finally
           {
              JDBCUtils.freeResources(result, null, null);
           }
        }
        catch (IOException e)
        {
           throw new RepositoryException(e);
        }
        catch (SQLException e)
        {
           throw new RepositoryException(e.getMessage(), e);
        }
  
        return dataSize;
     }
docs: Calculates workspace data size.
  
  @throws RepositoryException
  if a database access error occurs