Skip to contentManaged Kafka is live: Apache Kafka on AWS for half the cost of MSK

Flush rules

Tune flush rules

Pick flush rules that fit your destination type, and find which limit to change when pipeline latency is high.

Why destination type matters

Every flush has a fixed cost: creating a staging table, merging the data and cleaning up. The size of that cost depends on your destination type.

Online analytical processing (OLAP) and online transaction processing (OLTP) destinations follow the same flush pattern:

Create temp tableLoad dataRun MERGEDrop temp table

Each step adds a different amount of latency on each destination type.

OLAP destinations (Snowflake, BigQuery, Databricks, Redshift) add more latency per flush, for two reasons:

  • On Snowflake, Databricks and Redshift, Artie uploads each batch as a file before loading it.
  • These warehouses treat primary keys as informational and don’t index them, so the MERGE reads every part of the destination table it can’t prune.

A merge predicate on a cluster or partition key reduces the scan. With small batches, the fixed latency dominates.

OLTP destinations (PostgreSQL, MySQL, SQL Server) go through the same steps. These databases index a primary key with a B-tree, and the merge matches rows on the primary key. That lets it find each row through the index instead of scanning the table.

For analytical databases like Snowflake, Databricks, BigQuery, or Redshift, use larger, less frequent flushes. Each flush has a fixed cost, so a larger batch spreads it across more rows.

Example configuration: start with the Balanced preset (3 min, 1M changed records, 125 MB) or Write less often (15 min, 1M changed records, 125 MB). For higher volume, choose Custom and raise Batch size toward 500 MB.

For tables with very high write throughput on Snowflake, MotherDuck or Iceberg, turn on multi-step merge.

Custom accepts a time elapsed of 5 seconds to 24 hours, at least 5 changed records, and a batch size up to 1.5 GB.

Change flush rules

Flush rules apply to the whole pipeline. Where you set them depends on whether the pipeline is deployed:

  • New pipeline: on the Review and deploy step, under Delivery, set Flush timing.
  • Existing pipeline: select Edit pipeline, open the Destination tab, and set Preset under Flush rules.

If you start a pipeline from the Create a new pipeline form, Artie opens its edit page, so set flush rules on the Destination tab there.

Pipelines with a Kafka destination have no Flush rules section on the Destination tab.

For how the limits trigger a flush, see flush rules.

Debugging high latency

If pipeline latency is higher than expected, find which limit triggers your flushes. On the Analytics page, the Flush count chart labels each line with its reason: size, rows, time, or memory.

Then change the limit that matches your destination type and flush reason. The limit fields appear only when Preset is set to Custom:

Destination typeFlush reasonCauseChange
OLAPsize or rowsFlushes start before enough data accumulates, so batches are small and per-row overhead is high.Raise Changed records above the 1M default and Batch size toward 500 MB.
OLAPtimeEach batch is written before more data accumulates.Raise Time elapsed, for example from 3 minutes to 10 to 15 minutes.
OLTPsize or rowsBatches may be too large for the destination to process quickly. The destination holds a flush’s row locks until its merge commits, so a large batch blocks other writes to those rows for longer.Lower Changed records toward 1,000 and Batch size toward 10 MB.
OLTPtimeTime elapsed sets your maximum data freshness.If latency is acceptable but freshness isn’t, lower Time elapsed, for example to 30 seconds.

On OLAP destinations, a longer Time elapsed raises throughput: more data lands per flush, which spreads the fixed merge cost across a larger batch.

A memory flush comes from a memory limit that Artie sets on the pipeline. Your flush rules don’t control it.

Monitoring

The Flush count chart on the Analytics page shows how often Artie writes batches and what triggered each one:

Flush count

9,802

Past 7 days

  • reason: time24
  • reason: rows34
  • reason: size1
Sample data: size flushes take over while a backlog drains.

Was this page helpful?