
A Snowflake warehouse that suspends between jobs and wakes up 120 times a day to run 5-second tasks is billed for at least 120 minutes. The real work in those runs adds up to about 10 minutes, and spotting gaps like this is what ETL process optimization is really about.
That gap shows where the effort pays off once your pipeline already uses incremental loads, CDC, and bulk COPY. The waste moves into small places that rarely throw an error. A sensor holds a worker slot while it waits. One large gzip file can only be read by a single task. A MERGE scans the whole table to update one day of data.
This guide covers nine of these traps across extraction, transformation, loading, and orchestration. Each one comes with the symptom you will notice, a quick check, a fix, and the catch to watch for. Use it as an ETL process optimization checklist for the pipelines you already run, and you get lower runtime, a smaller bill, and fewer rows that go missing without a trace.
Key Takeaways
- ETL process optimization pays off most in small settings, not in core design.
- OFFSET paging makes each new page slower than the one before it.
- A plain updated_at watermark can lose rows that commit late.
- One huge gzip file, or thousands of tiny files, can stall a fast cluster.
- Short, frequent warehouse jobs can bill far more time than they use.
What ETL Process Optimization Means Once the Basics Are Done
ETL process optimization is the work of finding the part of a data pipeline that is slow, costly, or unreliable, and fixing that part. Once the basics are in place, the biggest gains often come from small, specific traps in extraction, loading, and orchestration.
Your data ETL process likely pulls only changed rows, pushes work into the warehouse, and loads in bulk already. So the question for ETL process optimization changes. It is no longer “what should we build?” It is “where is the time and money still going?”
The 9 Hidden Gems at a Glance
The nine ETL process optimization techniques below go past incremental loads and CDC. Each one starts with a symptom you can spot in a log, a query plan, or a bill.
| # | Gem | Symptom you will notice | Main impact |
|---|---|---|---|
| 1 | OFFSET pagination | Later pages are much slower than early ones | Runtime |
| 2 | Watermarks that skip rows | Target counts sit a little below the source | Correctness |
| 3 | Null keys in one partition | One task runs far longer than the rest | Runtime |
| 4 | One giant gzip file | A long stage with a single task | Runtime |
| 5 | Thousands of tiny files | Reads get slower every week | Runtime, scale |
| 6 | MERGE scanning the whole table | MERGE time grows with table size | Cost |
| 7 | Sensors holding worker slots | Tasks queue while the cluster looks idle | Runtime |
| 8 | Tiny jobs waking the warehouse | Credits climb while query time stays flat | Cost |
| 9 | Restarting from zero | One late failure doubles the day’s compute | Cost, reliability |
Extraction Gems That Hide in Plain Sight
Extraction is where ETL process optimization usually starts, because every later stage waits on it. These two gems look harmless in testing. They only show up once your tables grow.
Gem 1. OFFSET Pagination That Gets Slower Every Page
Many extract jobs page through a source table with LIMIT and OFFSET. It is a blind spot in ETL process optimization because it works fine on page 1. By page 100, each request is doing far more work than you think.
Symptom
The first pages come back in a second or two. Later pages take longer and longer, even though each page returns the same 10,000 rows.
Check
Look at the source query log. Compare the runtime of an early page with a late one. If the late page is many times slower, OFFSET is the likely cause.
The reason is simple. In PostgreSQL, rows skipped by OFFSET still have to be computed inside the server. So page 100 makes the database read about 1,000,000 rows to hand you the last 10,000.

Add up all 100 pages, and OFFSET reads about 50.5 million rows. Keyset pagination reads about 1 million. That is roughly 50 times more work for the same data.
Fix
Switch to keyset pagination. Instead of skipping rows, you start right after the last key you saw. On large source tables, this is often the biggest single extract win in ETL process optimization.
— Slow: the server computes all skipped rows
SELECT * FROM orders ORDER BY id LIMIT 10000 OFFSET 990000;
— Fast: start after the last id from the previous page
SELECT * FROM orders WHERE id > :last_id ORDER BY id LIMIT 10000;
Save the last ID after each page and pass it to the next query. Every page now costs about the same.
Watch Out
Keyset paging needs a unique, indexed sort column. If you sort by updated_at, add the id as a tie-breaker: WHERE (updated_at, id) > (:last_ts, :last_id). Without it, rows that share a timestamp can be skipped or repeated.
Gem 2. Watermarks That Silently Skip Late Rows
This one does not make your pipeline slow. It makes it wrong, and quietly. In ETL pipeline optimization, a fast load that drops rows is not a win.
Symptom
Row counts in the target sit a little below the source. Not by much. A few rows a day. Nothing fails, so nobody looks.
Check
Run a daily reconciliation. Count rows by updated_at date in the source and in the target. If small gaps show up on busy days, your watermark is the suspect. A shared sheet that uses Google Sheets conditional formatting can flag those gaps in red, so nobody has to read every row.
Here is how it happens, and why ETL process optimization has to include correctness. A long transaction stamps a row with updated_at = 10:58, but it does not commit until 11:02. Meanwhile, a quick update stamped 10:59 commits right away. Your 11:00 extract reads the 10:59 row and saves 10:59 as the new watermark. The 10:58 row was not visible yet. On the next run, you ask for rows after 10:59, so the 10:58 row never qualifies again.
Fix
Subtract an overlap from the stored watermark on every run. Then load with an idempotent MERGE, so rows you read twice do no harm. It is the cheapest correctness fix in ETL process optimization.
— Re-read a small window behind the last watermark
SELECT *
FROM orders
WHERE updated_at > :last_watermark – INTERVAL ’30 minutes’;
Merge the result on order_id instead of inserting it. A good starting overlap is 15 to 60 minutes. Base it on how long your longest source transactions stay open.
Watch Out
The overlap re-reads rows on purpose. If the load step is a plain INSERT, you will create duplicates. Also note that no timestamp watermark sees hard deletes. If deleted rows matter, you need log-based CDC.
Transformation Gems That Waste Your Cluster
A cluster can look busy and still sit mostly idle. In these two cases, most workers finish early and wait on one task. Good ETL process optimization means finding that one task.
Gem 3. Null Keys Piling Into One Partition
Say 30% of your orders are guest checkouts with no customer_id. When Spark shuffles those orders for a join, every null key lands in the same partition. One task gets 30% of the data. The other 199 tasks share the rest. For ETL process optimization in Spark, skew like this is the first thing to rule out.
Symptom
One task in a join stage runs for 40 minutes. The others finish in under 2. The stage, and the whole job, waits on that one task.
Check
Open the Spark UI and sort the stage’s tasks by duration. If one task is far above the median, count the nulls in your join key:
SELECT COUNT(*) FROM orders WHERE customer_id IS NULL;
Fix
Split the null keys out before the join. Join the rest. Then put the two parts back together.
from pyspark.sql.functions import col
nulls = orders.filter(col(“customer_id”).isNull())
keyed = orders.filter(col(“customer_id”).isNotNull())
joined = keyed.join(customers, “customer_id”, “left”)
result = joined.unionByName(nulls, allowMissingColumns=True)
Null keys never match in a join anyway. So you lose nothing by skipping them, and the skew is gone. The pattern needs only basic PySpark. If you are still building your skills, here is a realistic look at how long it takes to learn Python for this kind of work.
Watch Out
Spark’s Adaptive Query Execution can split skewed partitions on its own, so check that it is on first. But AQE skew join handling has limits, including some LEFT OUTER joins. Do not assume it saved you. Read the task times.
Gem 4. One Giant Gzip File That Blocks Parallel Reads
A vendor sends you one 40 GB orders.csv.gz each night. Your cluster has 64 cores. Only one of them does any reading, and no ETL process optimization in your SQL will change that.
Symptom
A long stage shows a single task. CPU on one node is at 100%. Every other node is close to idle.
Check
List the landing folder. Look at the file count and the file sizes. One or two very large compressed files are a warning sign.
The cause is the format. Gzip is an unsplittable file type, so one task must read the whole file from start to end.
Fix
Split before you compress. If you want to optimize ETL processes, faster data loading starts with file size. For Snowflake loads, aim for 100 to 250 MB compressed files. That lets the load run in parallel across many files.
# Split into 2-million-line parts, then compress each part
split -l 2000000 orders.csv orders_part_
gzip orders_part_*
If you control the export, ask for Parquet instead. It splits cleanly, and you skip CSV parsing too.
Watch Out
Gzip is not the enemy of ETL process optimization. Two hundred gzip files of 150 MB each load in parallel just fine. The problem is one huge file. Do not swing too far the other way, either. That leads straight to Gem 5.
Loading Gems That Quietly Raise Your Bill
Load problems tend to grow slowly. Each run is a little worse than the last, so nobody notices until the bill or the SLA does. Optimizing ETL processes in data warehouses means watching the shape of your tables, not just the speed of each load.
Gem 5. Thousands of Tiny Files From Frequent Writes
Micro-batch jobs that write every few minutes leave a small file each time. After a month, a table can hold tens of thousands of files of a few megabytes each.
Symptom
Reads get slower every week, even though data volume barely changed. Simple queries spend more time listing and opening files than reading data.
Check
On Delta Lake, run DESCRIBE DETAIL sales.orders; and look at numFiles and sizeInBytes. Divide size by file count. An average far below 100 MB on a large table is a red flag.
Fix
Compact the table on a schedule. It is the ETL process optimization step that streaming tables need most. On Delta Lake, that is one line:
OPTIMIZE sales.orders;
Many platforms also offer auto-compaction or optimized writes. Turn them on for tables fed by streaming or micro-batch jobs.
Watch Out
Compaction uses compute too, so count it in your ETL process optimization budget. Run it off-peak, and only on tables that need it. A table written once a day rarely does.
A Note for SAP HANA Optimized ETL Processes
Teams running SAP HANA optimized ETL processes still hit a version of this problem. In HANA’s column store, new writes land in a write-friendly delta storage first. A delta merge moves changes to main storage, which is compressed and faster to read. If the merge does not run, data stays in delta storage, and memory use and read speed both suffer. After large loads, make sure the delta merge actually runs.
Gem 6. MERGE Statements That Scan the Whole Target
Your nightly batch touches one day of orders. Your MERGE reads two years of them to find matches. From an ETL process optimization view, that is about 729 days of wasted reading every night.
Symptom
MERGE time grows with the size of the target table, not the size of the batch. The batch is flat at 2 million rows a night, but the MERGE takes longer every month.
Check
Open the query profile for the MERGE. Look at files or bytes scanned on the target side. If it reads most of the table, the engine is not pruning, and this is where ETL process optimization pays off fastest.
Fix
Add a literal filter on the partition or date column to the match condition. Delta Lake’s own guidance says to reduce the search space in the match condition. This is one of the most useful ETL operations SQL changes you can make.
— Before: compares the batch against the whole table
MERGE INTO sales.orders t
USING staging.orders s
ON t.order_id = s.order_id
WHEN MATCHED THEN UPDATE SET *
WHEN NOT MATCHED THEN INSERT *;
— After: the engine can skip older partitions
MERGE INTO sales.orders t
USING staging.orders s
ON t.order_id = s.order_id
AND t.order_date >= ‘2026-10-01’
WHEN MATCHED THEN UPDATE SET *
WHEN NOT MATCHED THEN INSERT *;
Use a real date value, not a column from the source. The engine needs a fixed value at plan time to skip files. Compute it from the batch first, for example the minimum order_date in staging.
Watch Out
The filter must cover every row the batch can touch. A late update for an order from last March would be treated as new, which creates a duplicate. Build the date from the batch, never from a guess.

Orchestration Gems That Burn Time and Money
These last three gems live outside your SQL. They are in your scheduler and your billing settings. That is exactly why ETL process optimization work often misses them.
Gem 7. Sensors That Hold Worker Slots While They Wait
A sensor waits for something, such as a file in S3. The same rule applies to any small business automation setup: a task that only waits should not hold resources. Picture a vendor file that shows up two hours late. Depending on its mode, the sensor may hold a worker slot that entire time.
Symptom
Tasks sit in the queue, yet the cluster’s CPU looks low. Nothing is broken. Workers are just busy waiting.
Check
In the Airflow UI, count the sensors in a running state. Compare that number with your total worker slots. If sensors take a large share, you found an easy ETL process optimization target.
The three sensor modes in Airflow behave very differently while they wait:
| Mode | Holds a worker slot while waiting? | Needs a triggerer? | Best for |
|---|---|---|---|
| poke | Yes, the whole time | No | Waits for a few seconds |
| reschedule | Only during each check | No | Long waits with no triggerer |
| deferrable | No | Yes | Most long waits |
Fix
Use deferrable sensors where you can. The wait moves to a light triggerer process, and the worker slot is free for real work. In Airflow, this is often the quickest ETL process optimization win you can ship.
from airflow.providers.amazon.aws.sensors.s3 import S3KeySensor
wait_for_vendor_file = S3KeySensor(
task_id=”wait_for_vendor_file”,
bucket_key=”s3://vendor-drop/orders/{{ ds }}/orders.csv”,
deferrable=True,
)
If you cannot run a triggerer, set mode=”reschedule” instead. It frees the slot between checks.
Watch Out
Deferrable mode only works when the triggerer process is running. If it is not, deferred tasks just sit there. Check it before you switch a whole DAG.
Gem 8. Tiny Jobs That Keep Waking the Warehouse
Optimizing ETL processes in data warehouse environments means watching how often compute starts, not only how long it runs. In Snowflake, each time a warehouse resumes, it is billed for at least 60 seconds per resume. A 5-second job pays for a full minute.
Symptom
Your credit use climbs, but total query time stays flat. You see many short jobs spread across the day, each on its own schedule.
Check
In Snowflake, compare WAREHOUSE_METERING_HISTORY with QUERY_HISTORY for the same warehouse and day. If billed time is many times the query time, wake-ups are the cause.
The chart below assumes 5-second jobs and a warehouse that suspends between them.

At 120 wake-ups a day, you pay for about 120 minutes and use about 10. That is 12 times the work you actually run. Credit cost depends on warehouse size, so the chart shows minutes, not dollars.
Fix
Group small jobs into fewer runs. Like most cost reduction methods, the savings come from cutting waste you already pay for. Ten small loads that run one after another in a single window pay the minimum once, not ten times. This is ETL process optimization through scheduling, not code. Also keep your auto-suspend setting in mind. A warehouse that suspends and resumes within the first minute is charged the minimum again.
Watch Out
A very low auto-suspend can cost more, not less. If jobs arrive every 30 seconds, a slightly longer idle time keeps the warehouse warm. Test with your own job pattern.
Gem 9. Restarting Failed Runs From Zero
Reruns are the forgotten cost line in ETL process optimization. Planning for failure belongs in any cyber resilience strategy, and your pipelines need the same thinking. Your pipeline runs for 4 hours. It fails at 3.5 hours on the last step. Someone clicks “rerun”, and the whole thing starts again.
Symptom
A failure near the end almost doubles that day’s compute. The data also lands hours late.
Check
Look at last month’s reruns. How many restarted the full pipeline instead of the failed step? Each one is wasted compute you can measure.
Fix
Keep the output of each stage: raw, staging, and final. Then rerun only the step that failed. In Airflow, clear just the failed task and its downstream tasks. Recent dbt versions also include a dbt retry command that picks up from the point of failure. Log each failure in an IT ticketing system, too. After a month, you will see which steps fail most.
The math is easy to share with your team. A full rerun after a failure at 3.5 hours costs 7.5 hours of compute for one day. Rerunning only the last 30-minute step costs 4 hours. This is the ETL process optimization case your finance team will understand fastest.
Watch Out
Stage outputs must be complete before anything reads them. Write each batch to a dated path and mark it done with a success flag only at the end. Otherwise, a rerun can start from half a batch.
Best Tools for Optimizing ETL Processes Performance Tuning
You do not need a new platform for ETL process optimization. The best tools are often the ones you already run, used with a clear question in mind. This table maps each tool to the gem it helps you diagnose.
| Tool | What it shows | Gems it helps with |
|---|---|---|
| PostgreSQL EXPLAIN ANALYZE | Rows read and time per step of a query | 1 |
| Source vs target count queries | Daily row gaps between systems | 2 |
| Spark UI (stages and tasks) | Task duration spread and single-task stages | 3, 4 |
| Delta Lake DESCRIBE DETAIL | File count and total size of a table | 5 |
| MERGE query profile | Files and bytes scanned on the target | 6 |
| Airflow UI and pools view | Running sensors vs available slots | 7 |
| Snowflake WAREHOUSE_METERING_HISTORY and QUERY_HISTORY | Billed time vs actual query time | 8 |
| Orchestrator run history | Full reruns vs single-step retries | 9 |
Query plans and pipeline code can get hard to follow. A code visualizer can turn them into diagrams your whole team can read.
Good ETL process optimization is a habit, not a one-off project. A monthly look at these numbers catches most new problems early.
Where to Start: A Simple Rollout Order
The ETL process optimization examples above do not all take the same effort. Some are a setting. Others change how your tables are laid out. This order gets you early wins while you plan the bigger work.
- Quick config wins first: Gems 7 and 8. They are settings, and savings show up within days.
- Correctness next: Gem 2. A small change that protects trust in your numbers.
- Data layout work after that: Gems 3, 4, 5, and 6. Test these one table at a time.
- Process change last: Gem 9. It changes how your team handles failures, so agree on it together.
Measure before and after each change. Track runtime, billed time, and row counts per run. A simple no-code dashboard is enough to keep these numbers in view. In ETL process optimization, a fix without a before number is just a guess.
Conclusion
None of these nine gems needs a rewrite. Most are a setting, a filter, or a change in file size. That is the quiet side of ETL process optimization: easy to miss, and cheap to fix. Pick the one that matches a symptom you saw this month. Measure, fix, and measure again. A steady run of small fixes will do more for your pipeline than one big rebuild.
FAQs
What are the best practices for optimizing ETL processes?
Good ETL process optimization starts with the basics: incremental loads, pushdown into the warehouse, and bulk loading. Then measure each stage and fix the specific trap the numbers point to. Common ones are skewed joins, bad file sizes, and MERGE statements that scan the whole table.
How can I optimize the ETL process for better performance?
Find the slowest stage first, using stage timings from your orchestrator. Then look for a single long task, very large or very small files, and full-table scans during MERGE. In ETL process optimization, fixing one real bottleneck usually beats tuning many small things.
How can ETL jobs be optimized for more efficient processing?
Free worker slots held by waiting sensors, group short warehouse jobs into fewer runs, and rerun only the failed step after an error. These ETL optimization techniques cut wasted compute without changing your data model.
Why does one Spark task take much longer than the others?
In ETL process optimization work, the cause is usually data skew, often from many null or default keys in a join. It can also be one large unsplittable file, such as a big gzip. The Spark UI’s task view will show which one it is.
Can an incremental load miss rows without any error?
Yes, and it is the most overlooked risk in ETL process optimization. If a transaction commits after your watermark has already moved past its timestamp, that row is skipped for good. Re-reading a short overlap window and loading with MERGE fixes it.
Why does Snowflake charge more for small, frequent jobs?
Each time a Snowflake warehouse resumes, it bills at least 60 seconds. Many short jobs on separate schedules pay that minimum again and again. From an ETL process optimization view, grouping them into one run pays it once.
Is ETL process optimization a one-time project?
No. Data volume, change rates, and source systems keep shifting, so a well-tuned pipeline can drift back. Review stage timings and costs once a month.
