Look for bytes that stay after a change
Maple Market replaces the prices on last month’s orders. The number of visible rows stays the same, but storage rises. Snowflake may retain versions of the data so the team can recover an earlier state. A row count describes the current table and tells you little about historical storage.
Active bytes belong to current data. Time Travel retains historical data for the configured period so supported operations can access it. Fail-safe retains eligible permanent table data for Snowflake-managed recovery. Temporary and transient tables have no Fail-safe and have shorter Time Travel options. Choose table types and retention from the recovery requirement. Time Travel longer than one day for permanent objects requires Enterprise Edition or higher.
Files in internal stages also use storage. List them before asking the data owner to expire files. Check replay, compliance and recovery needs first. Use daily average volumes for a trend and applicable billing views for reconciliation.
Follow shared bytes after a clone diverges
A zero-copy clone initially references storage already used by the source. As either table changes, new physical bytes can appear. Old bytes can continue to be charged after their usual retention windows if a clone still needs them. In the storage metrics, each byte category is billed to its owning table. A clone group ID ties versions and clones back to their oldest ancestor.
In this fictional snapshot, the original owns 100 active units and no historical units when the clone is created. Later, the original owns 100 active, 10 in Time Travel, 5 in Fail-safe and 15 retained for the clone. The clone owns 20 active units of its own. Add each owned amount once. After the changes the group accounts for 150 units. A snapshot explains what is present at a point in time. Monthly billing uses storage volumes over time.
| Snapshot | Source active | Clone-owned active | Time Travel | Fail-safe | Retained for clone | Total |
|---|---|---|---|---|---|---|
| Just cloned | 100 | 0 | 0 | 0 | 0 | 100 |
| After changes | 100 | 20 | 10 | 5 | 15 | 150 |
Trace a partition through retention and monthly billing
Snowflake bills standard storage on the average compressed bytes stored each day in the month. The incoming file size and number of rows are poor estimates. In a fictional 30-day month, a clone group at 100 GiB for 18 days and 150 GiB for 12 days averages 120 GiB. A snapshot of 150 GiB on the last day cannot calculate that average. Convert to the applicable contract billing unit before pricing it.
When a write replaces or deletes data, old partitions can remain through Time Travel. Eligible permanent data then enters seven-day Fail-safe. A clone may keep references alive beyond an ordinary retention window. Some retained bytes can also reflect backups. Allow time for asynchronous cleanup. Never assume a drop or retention change removes the charge immediately.
| Type | Lifetime | Time Travel | Fail-safe |
|---|---|---|---|
| Permanent | Until dropped | 0 or 1 day on Standard, up to 90 days on Enterprise or higher, subject to applicable settings | 7 days |
| Transient | Until dropped | 0 or 1 day | None |
| Temporary | Until the session ends or it is dropped | 0 or 1 day, within the temporary table lifetime | None |
- Original physical partitionSource update writes replacement data to New active partition
- Original physical partitionRetain history where applicable to Time Travel and eligible Fail-safe
- Original physical partitionKeep shared data while referenced to Clone still references original bytes
Verify divergence with two orders
Use an approved disposable schema, a warehouse with USAGE and a role that may create tables there. Run all the statements in one session with new names. Clone creation shares source storage. Update only the clone. The source returns order 101 with amount 40; the clone returns 45; both return order 102 with 60. This small test proves data independence. Metered bytes can be rounded by storage layout and delayed.
Create a source and change only its clone
The source and clone are permanent tables in this example. DATA_RETENTION_TIME_IN_DAYS sets the source’s retention in days. Use a disposable schema and leave the tables in place only for the intended test window.
USE SCHEMA <LAB_DB>.<LAB_SCHEMA>;
CREATE TABLE M16D_ORDERS_SRC (order_id NUMBER, amount NUMBER) DATA_RETENTION_TIME_IN_DAYS = 1;
INSERT INTO M16D_ORDERS_SRC VALUES (101, 40), (102, 60);
CREATE TABLE M16D_ORDERS_COPY CLONE M16D_ORDERS_SRC;
UPDATE M16D_ORDERS_COPY SET amount = 45 WHERE order_id = 101;
SELECT 'SOURCE' AS copy_name, order_id, amount FROM M16D_ORDERS_SRC
UNION ALL
SELECT 'CLONE', order_id, amount FROM M16D_ORDERS_COPY
ORDER BY copy_name, order_id;Inspect the clone group and remove the test tables
Run the first query with an authorized role when Table Storage Metrics catches up. Filter using the source’s exact names. Grouping by a clone-group ID in a subsequent report captures dropped generations too. The byte columns let you trace ownership without adding two logical copies of shared partitions. Run the cleanup as the table owner in the same lab schema after verification.
SELECT id, clone_group_id, table_name, table_dropped,
active_bytes, time_travel_bytes, failsafe_bytes, retained_for_clone_bytes
FROM SNOWFLAKE.ACCOUNT_USAGE.TABLE_STORAGE_METRICS
WHERE table_catalog = '<LAB_DB>' AND table_schema = '<LAB_SCHEMA>'
AND table_name IN ('M16D_ORDERS_SRC', 'M16D_ORDERS_COPY')
ORDER BY clone_group_id, id;
-- After comparison and only in the approved lab schema.
DROP TABLE <LAB_DB>.<LAB_SCHEMA>.M16D_ORDERS_COPY;
DROP TABLE <LAB_DB>.<LAB_SCHEMA>.M16D_ORDERS_SRC;Explain the decision in an interview
Start with the rule, then say what you would check in a real account.
Does zero-copy cloning mean a clone is always free?
It initially shares existing partitions. Changes produce new physical data and a remaining clone can keep old data referenced. I check owned bytes over time before making a cost claim.
When could a transient table be appropriate?
I would consider it for data I can regenerate from an approved source. It has a shorter recovery window and no Fail-safe. I would keep critical source data under the required recovery policy.
How can storage grow while row count stays flat?
Updates can replace partitions and leave older versions for retention or clones. I would also check stage files and whether the daily billable average actually moved.
Words used in this lesson
- Time Travel
- Snowflake access to eligible historical data during a retention period.
- Fail-safe
- Snowflake-managed recovery for eligible permanent data after Time Travel.
- Clone group ID
- The identifier of the oldest source ancestor in a clone family.
See how it works
Choose a step to explore the idea at your own pace.
Open the interactive explanation
Explain storage, Time Travel and clone costs
Make the clone
The original and its clone reference the same initial storage.
Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.
Read the complete diagram explanation
- Make the clone
The original and its clone reference the same initial storage.
Original owns 100 units → Clone shares initial bytes
- Let the tables diverge
The clone owns its new bytes and the source can retain old bytes still referenced by the clone.
New owned bytes → Retained source bytes → Group total 150 units
Try the SQL or command
Read → predict → run in your learning environment → compare. You can also learn by reading without an account.
New to SQL? Where to run it and how to read it
A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.
- No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
- For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
- Read the entire example, including comments beginning with
--. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor. - Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
- SELECT / FROM
- Choose the values to return / identify their input.
- VALUES / COLUMN1
- VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
- AS / WITH
- AS gives a result a readable name. WITH names a temporary query step within one statement.
- NULL / ::
- NULL means missing or unknown. The :: notation converts a value to a named data type.
- Session
- One connection and its settings. Keep related transaction steps in the same session.
- Database.schema.table
- A full address for stored data. It is separate from the warehouse that processes queries.
Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →
Help with common practice errors
- No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
- Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
- Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
- Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
Read the account’s recent storage trend
ALTER SESSION SET TIMEZONE = 'UTC';
SELECT usage_date, storage_bytes, stage_bytes, failsafe_bytes
FROM snowflake.account_usage.storage_usage
WHERE usage_date >= DATEADD(day, -8, CURRENT_DATE())
AND usage_date < DATEADD(day, -1, CURRENT_DATE())
ORDER BY usage_date;What to expect and why
Each row shows the account’s average daily volume. STORAGE_BYTES includes Time Travel. STAGE_BYTES covers internal stage files. Storage Usage is useful for trends and can differ from billed storage. The STORAGE_DAILY_HISTORY view in Organization Usage is closer to invoice measurement. Other storage categories can apply to an account.
Find which storage category grew within a clone group
SELECT id,
clone_group_id,
table_name,
table_dropped,
active_bytes,
time_travel_bytes,
failsafe_bytes,
retained_for_clone_bytes
FROM snowflake.account_usage.table_storage_metrics
WHERE clone_group_id = 123456
ORDER BY id;What to expect and why
Use approved visibility. Replace 123456 with the clone group ID from an authorized inspection of the source table. Keep dropped rows because they can still own billed bytes. A retained value can also reflect other supported references such as WORM backups, so check the actual dependency before making a deletion plan.
Check your understanding
Choose an answer, then check your reasoning. This is practice, not a scored test.
Try it yourself
Stage bytes doubled. Table bytes and Fail-safe held steady. What should the team inspect first?
Compare your reasoning
Inspect which internal stage or prefix grew and whether files are still needed for ingestion replay. Agree a retention policy with the data owner.
Connect this lesson to the learning path
Official sources and curriculum
Module 16 · See module scope
By Rohit Ray · Independent educational lesson · Explore this visual lab