Reputation: 11
From snowflake document clone storage usage. Every table within a clone group has an independent life-cycle, ownership of the storage within these tables sometimes needs to be transferred to a different table within the clone group. For example, consider a clone group that consists of:
T1 >> T2 >> T3
T1
has 10M data, (p0=5M + p1=5M)
T1
and T2
share 5M data (Partition1 -> p1)
T2
has 15M data, (p1 + p2=5M + p3=5M)
T2
and T3
share 10M (p1 + p2)
data
T3
has 12M data, (p1 + p2 + p4=2M)
T3
and T2
share 10M data in total. (p1 + p2)
If the time-travel window is zero.
T2
is dropped:
p1
is still under t1
's ownership and referenced by t3
?
p2
ownership will be transferred from t2
to t3
?
And the total storage usage after t2
is dropped is
p0 + p1 + p2 + p4 = 5 + 5 + 5 + 2 = 17
?
Upvotes: 1
Views: 180
Reputation: 2880
EDIT: Update answer according to further research
It does seem that micro-partition ownership does change ownership after the time-travel window (of 0 in this case) So I believe that you are correct
See Owned Storage vs Referenced Storage documentation
Related: Storage metrics don't appear to change and will continue to point at the original table even if it gets dropped or renamed. See Table Storage Metrics usage notes
Storage bytes are always owned by, and therefore billed to, the table where the bytes were initially added. If the table is then cloned, storage metrics for these initial bytes never transfer to the clones, even if the bytes are deleted from the source table.
Upvotes: 2