Changes between Initial Version and Version 1 of drmsAscertainSpace


Ignore:
Timestamp:
03/25/14 12:44:56 (10 years ago)
Author:
niles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • drmsAscertainSpace

    v1 v1  
     1 
     2Ascertaining how much disk space a series uses 
     3 
     4The first thing to do is to go into the SUMS database and build a temporary table (lasts only for the current session) with storage information : 
     5 
     6create temporary table space_used as ( select sum(bytes) as bytes, owning_series from sum_main group by owning_series ); 
     7 
     8The resulting table looks something like this : 
     9 
     10     bytes      | owning_series 
     11----------------+--------------- 
     12  2293889467054 | hmi.m_45s 
     13  2551641062389 | hmi.v_45s 
     14  2604818885633 | hmi.s_720s 
     15 34888439851665 | aia.lev1 
     16 
     17The creation of this table can take a while. 
     18 
     19Then we need to do a sum through that table of storage for series name(s) that match what we want (and convert to GB) - for instance : 
     20 
     21select sum(bytes)/1024/1024/1024 as HMI_GB from space_used where owning_series like 'hmi%'; 
     22       hmi_gb 
     23-------------------- 
     24 51440.777539771982 
     25(1 row) 
     26 
     27 
     28select sum(bytes)/1024/1024/1024 as AIA_GB from space_used where owning_series like 'aia%'; 
     29       aia_gb 
     30-------------------- 
     31 47510.095782309771 
     32(1 row) 
     33 
     34