Skip to content
Learn › Help: open the docs menu

Speed up a slow Mammoth pipeline

Mammoth runs all processing on its servers, so your browser isn't the bottleneck. Slowness almost always comes from large unfiltered datasets, pipeline tasks that process more data than they need, or too many scheduled refreshes at once. The biggest single fix is to filter rows early.

Find what's slow

SymptomMost likely causeGo to
Pipeline times out or runs for a long timeLarge dataset and expensive operationsFind the slow task
Dashboard is slow to load or update, or AI dashboard generation is slowThe source View is large or its pipeline is slow, the draft isn't synced and published, or the View is wideSpeed up a slow dashboard
Scheduled refresh takes hours, times out or gets slower each weekToo many datasets refreshing at once, or pulling the full table on every runSpeed up refreshes and exports
Export to BigQuery or SFTP is slowExport volume or destination setupSpeed up refreshes and exports

How dataset size affects speed

The more rows a task processes, the longer it takes. Smaller datasets need no special tuning. With millions of rows, apply Conditional Filter and Remove Column tasks early, aggregate for dashboards, and use Draft mode when you change several tasks. For very large datasets, use cloud connectors (such as BigQuery or Snowflake) rather than file upload, aggregate Views before building dashboards, and discuss architecture with support@mammoth.io if it's still too slow.

Filter rows early in the pipeline

Mammoth runs your pipeline top to bottom, and every row that exists at task 3 gets processed at task 4. A Conditional Filter at task 2 that removes 70% of rows makes every later task process only 30% of the data. Place it first or second after the source, and combine several conditions into one filter.

Slow:

Source: 2M rows
→ Join with customer table (2M × customer table)
→ Math Function: calculate margin (2M rows)
→ Conditional Filter: keep active accounts only (removes 60%)
→ Group & Pivot (800K rows)

Faster:

Source: 2M rows
→ Conditional Filter: keep active accounts only (→ 800K rows)
→ Join with customer table (800K × customer table, 60% less work)
→ Math Function: calculate margin (800K rows)
→ Group & Pivot (800K rows)

Likewise, filtering 5M rows to the current year before a Join with a pricing table leaves 400K rows: the Join input drops by over 90%.

Order pipeline tasks from light to heavy

Run the cheapest tasks first, so they shrink the data before the expensive ones see it.

WeightTasksWhy
Light: run earlyConditional Filter, Remove Column, Convert Column TypeReduce rows or columns, or change a type
MediumText Formatting, Label & Insert Values, Fill Missing Values, Bulk ReplaceWork through every remaining row
Heavy: run lateJoin, Lookup, Group & Pivot, Window function, Math Function on many columnsCombine tables or compute across rows

A good order for most pipelines: Conditional Filter, Remove Column, type conversions, text standardisation (Bulk Replace, Text Formatting), enrichment (Join, Lookup), calculations (Math Function, Add Column), then aggregation (Group & Pivot, Window function).

Remove unused columns right after the source

Add a Remove Column task right after the source to keep only the columns you need. If a source has 47 columns and your analysis needs 10, removing the other 37 means every later task handles less data.

Make joins faster and stop row fan-out

Joins are the most common bottleneck.

  • Filter both datasets before joining. Reducing either input reduces the work.
  • Use Lookup instead of Join for single-column matching. Lookup fetches one value from another View by a matching key and returns at most one match per row, so it can't multiply rows (for example, adding a product name from a reference table). Use Join when you need several columns or Inner, Left, Right or Outer behaviour.
  • Check for duplicate join keys. A repeated key multiplies rows (fan-out): joining 100K rows to a reference table where each key appears 5 times gives 500K rows. Run Remove Duplicate Rows on the reference dataset first if needed.
  • Don't join to the same dataset repeatedly. Save the join result as a new dataset instead.

Mammoth blocks a join that bloats the row count. A Join predicts its result size first. When the predicted output is over 100,000 rows and more than 5 times the larger input's row count, it fails with a row-count error instead of running. Check both sides for duplicate keys, then remove duplicates or filter first. Lookup doesn't need this safeguard.

Apply several tasks at once with Draft mode

Draft mode queues new tasks instead of running each one straight away, so the pipeline doesn't re-run after every change. Use it to build several tasks on a large dataset, redesign part of a pipeline, or test a new sequence.

  1. Open the pipeline and click More Pipeline options (the ... menu in the pipeline toolbar).
  2. Turn on Draft mode.
  3. Add your tasks. They stay pending, and the pipeline shows Pending Updates.
  4. Open Pending Updates and click Review, Apply now to run them together once, or Discard.

See How the pipeline works.

Split a long pipeline into stages

A long pipeline is easier to troubleshoot and maintain when each View handles one stage. Each View can be monitored and run on its own, and a failure stays in its stage. Use an intermediate Send to Dataset task if several Views share a complex sub-pipeline.

Source dataset
└── View 1: Data quality (filter, clean, standardise)
    └── View 2: Enrichment (joins, lookups)
        └── View 3: Calculations and output
Was this page helpful?

Something wrong? support@mammoth.io