This repository has been archived by the owner on Jun 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Segment Cache View
sdesikan6 edited this page Mar 14, 2018
·
2 revisions
Use snap$cachesegments
view to get an idea of the segment files on cluster hosts.
Output structure of the view is:
indexName : StringType
segmentName : StringType
partitionValues : StringType
creationTime : StringType
lastAccessTime : StringType
size : LongType
host : StringType
select * from `snap$cachesegments`
select host, count(segmentName) as numSegments, sum(size)/(1000*1000*1000) as totalSizeGB.
avg(size/(1000*1000)) as avgSegmentSizeMB
from `snap$cachesegments`
group by host
order by 1, 3
select host, count(segmentName) as numSegments, sum(size)/(1000*1000*1000) as totalSizeGB.
avg(size/(1000*1000)) as avgSegmentSizeMB
from `snap$cachesegments`
where indexName='sales.sales_snap'
group by host
order by 1, 3