Skip to the page
Get started

Docs · Connecting to data

Timeouts and row limits

The two settings every source has, what they default to, and what happens when one is hit.

Every data source has the same two settings, on its Settings tab.

SettingDefaultMinimumMaximum
Timeout (ms)30000 — thirty seconds1000None
Max rows500001None

Neither has an upper bound. Mosaic will let you ask for a ten-minute timeout and two million rows; whether the database agrees is between you and it.

Two exceptions: SQLite has no timeout, because there is no connection to time out. The File panel does not show one either.

#When Max rows is hit

The result is truncated and the run warns: "Result truncated to the first 50000 of 184203 rows."

This is the setting most likely to make a Check quietly wrong, because a truncated source produces rows that genuinely are missing from the comparison — and they look exactly like rows that are missing from the system.

Two habits:

  • Narrow the query instead of raising the limit. A Check comparing one business date does not need the year.
  • Watch for the warning. If a source truncates, treat the run as unusable rather than as a result with a caveat.

#When the timeout is hit

The run fails with the driver's own error. Thirty seconds is generous for a well-indexed query at the grain a Check should be comparing at, and stingy for a full table scan across a year — which is a hint about which of the two you have written.

#Try drafted queries

SQL sources have a third setting:

Try drafted queries on this database automatically — Build with Agent runs each draft once, limited to a few rows, before showing it. The database still does the work of the query — a total over a very large table can take up to 30 seconds. Switch this off for a busy production system; a draft can still be tried by hand.

It is on by default. Turn it off on anything where an unexpected query at an unexpected moment would be a problem.

#What these settings are not

They do not bound the comparison. An aggregation reading two sources of 50000 rows each is working with 100000 rows regardless of what either source's limit says.

They also do not bound a collection. A twenty-host fan-out applies Max rows to the combined result, not per host — so a limit that is comfortable for one machine can truncate across twenty.