projection_storage total usage vs disk_storage/storage_usage
Hi, can someone explain the difference in the used bytes totals when querying projection_storage vs. disk_storage or storage_usage?
disk_space_used_gb,disk_space_free_gb,disk_space_total_gb
9616,3035,12652
9616,3035,12652
vs. projection_storage
total_used_gb
8942
Why aren't 9616 and 8942 the same? Thanks in advance.
--projection_storage SELECT projection_name, SUM(used_bytes)/1024^3 AS total_used_GB FROM projection_storage group by 1; --disk_storage or storage_usage SELECT SUM(used_bytes)/(1024^3) AS disk_space_used_gb, SUM((used_bytes+free_bytes)-used_bytes)/(1024^3) AS disk_space_free_gb, SUM(used_bytes+free_bytes)/(1024^3) AS disk_space_total_gb FROM v_monitor.storage_usage WHERE filesystem = 'vertica' union all SELECT SUM(disk_space_used_mb)/1024 AS disk_space_used_gb, SUM(disk_space_free_mb)/1024 AS disk_space_free_gb, SUM((disk_space_used_mb+disk_space_free_mb)/1024) AS disk_space_total_gb FROM v_monitor.disk_storage WHERE storage_usage = 'DATA,TEMP'
0
Answers
Projection_storage is disk space used by Vertica ROS files and disk_storage is current state of disk ( all of which may not be used by ROS files)
Got it, many thanks for the quick response.