TL;DR: Large federated joins fail when both the result set and the build side exceed connector limits, because a single request cannot fetch enough rows or fit enough state in memory, according to Vega. Paging the build side with a stable cursor turns those limits into a streaming pattern that preserves order and completeness.
At a glance
What this is: NHI Mgmt Group's analysis, drawing on Vega's blog post: Federated joins over very large tables need paged build-side retrieval, because connector limits and memory pressure make one-shot joins fail.
Why it matters: This matters because identity and security analytics often depend on joining logs, detections, and access records at scale without losing ordering, completeness, or response time.
Context
Federated query engines have to reconcile two competing constraints: they need enough data to compute an accurate join, but they cannot always fetch or hold the full dataset from each source at once. In security analytics, that tension shows up quickly when authentication logs, detections, and other event streams must be joined across systems. The problem is not the join itself. It is the assumption that the build side can be materialised before the engine can move forward.
Vega's analysis shows that the deeper issue is not only memory pressure but orchestration across source systems that enforce their own row and body limits. Once the join becomes a cross-platform read problem, the engine has to respect connector budgets, preserve global ordering, and keep output moving. That is a broader data-engineering constraint than a pure search problem, but it is highly relevant to security telemetry pipelines.
For IAM and detection teams, this is a reminder that correlation logic depends on the shape of the underlying access data as much as the query syntax. A join across identity and detection sources is only as reliable as the paging, ordering, and completeness guarantees behind it.
Key questions
Q: How do federated joins work when the data is too large to fetch at once?
A: Federated joins usually collect join keys from one side, push them into the other side as a filter, and then join the returned rows. When the build side is too large for one fetch, the engine has to page through it and reconstruct the join in smaller bounded steps. That keeps connector limits, memory use, and result completeness under control.
Q: Why do keyset pagers need a tie breaker?
A: A tie breaker ensures rows with the same sort key still page in a stable, repeatable order. Without a second ordering column, keyset pagination can skip or duplicate records when values such as timestamps are not unique. Teams usually add a unique column, such as an ID, to the ORDER BY and the cursor predicate.
Q: How should teams limit query memory in federated search engines?
A: Teams should cap memory with per-query limits, concurrency controls, and spill-to-disk settings, then size joins and aggregations to stay within those bounds. Federated search engines often fan out to multiple sources, so one large request can exhaust coordinator memory, trigger OOM failures, or force the engine to cancel the query.
Q: What happens when connector row caps block a federated join?
A: A connector row cap can stop the remote side from returning enough rows for the join, so the query returns partial results, no matches, or fails outright. In federated joins, the cap acts as a protective limit on data transfer and execution cost, but it can also change result completeness if the join depends on more rows than the connector will supply.
Technical breakdown
Why dynamic filtering works until the build side gets too large
Federated joins usually start by collecting join keys from the build side and pushing them into the probe side as a filter. That reduces the amount of data the probe connector returns and makes large joins practical when the key set is still compact. The failure mode appears when the key set itself becomes too large to render into a single predicate or request body. At that point, the filter is no longer a compact optimisation. It becomes another payload that must respect connector limits, which is why splitting the filter into chunks is sometimes necessary.
Practical implication: Treat pushed-down key filters as a constrained transport problem, not just a query optimisation.
Why keyset pagination needs a stable tie breaker
Keyset pagination advances by ordering rows, taking a page, then asking for rows strictly after the last tuple from that page. That works only when the cursor is unambiguous. In real log data, many rows share the same timestamp or other sort value, so a cursor based only on the sort column can either skip tied rows or repeat them forever. The practical fix is to extend the cursor with a stable secondary value so that every page boundary is unique even when the primary sort value is not. Without that, completeness and progress both break.
Practical implication: Use a deterministic tie breaker in the cursor whenever the sort column is not unique.
How thin pages and re-fetches separate progress from completeness
The design splits the work into two queries. The thin page fetches only the cursor columns and join key, which keeps the request small and guarantees progress through the ordered dataset. The second query re-fetches the full rows for the keys that matched inside that window, using an inclusive upper bound so tied rows are not lost. This separation matters because the first query is about advancing the cursor honestly, while the second query is about reconstructing the full join result without truncation. It is a useful pattern whenever a connector can paginate cheaply but cannot safely return an entire large result in one pass.
Practical implication: Separate cursor advancement from row reconstruction when source limits prevent a single complete fetch.
NHI Mgmt Group analysis
Pagination is a governance mechanism for data access, not just a performance trick. Once a security platform depends on federated joins, the engine has to prove that it can retrieve evidence completely under source-side limits. That shifts the problem from query tuning to control design: ordering, completeness, and replay safety become part of the analytic trust model. Practitioners should treat pagination as a prerequisite for defensible correlation, not an implementation detail.
Stable cursors are the difference between useful correlation and silent data loss. If the page boundary is not unique, the engine either drops tied records or loops on them, which means the correlation result can be incomplete without looking broken. In identity and detection workflows, that is dangerous because missing rows can hide a suspicious access pattern or delay a response. The cursor design has to make lossless progression explicit, not implicit.
Thin scans and full re-fetches are a strong pattern for source systems that enforce hard caps. The first pass needs enough information to move the window forward, while the second pass needs enough context to complete the join. That is especially relevant where log platforms, identity systems, and detection back ends expose different limits and sort behaviour. Practitioners should design for connector budgets up front instead of assuming a single query can carry the whole workload.
Federated security analytics need a join architecture that respects evidence boundaries. In practice, that means the engine must preserve order, completeness, and bounded resource use at the same time. The named concept here is paging integrity: the ability to advance through large, source-limited datasets without skipping tied rows or exceeding connector budgets. Teams that build around paging integrity can scale joins without turning reliability into a hidden assumption.
What this signals
As security telemetry becomes more distributed, correlation engines will increasingly need cursor discipline as a first-class control. The failure mode is not just slow queries. It is partial evidence, unstable ordering, and joins that appear successful while silently omitting tied records.
Paging integrity: federated analytics will need deterministic advancement through source-limited datasets, or they will trade scale for confidence. That makes pagination design part of detection engineering, especially where identity logs and threat detections must be joined under connector budgets.
Teams that rely on cross-system joins should expect more pressure to prove completeness under source caps rather than merely prove query speed. The operational question becomes whether the correlation layer can move through large identity and detection datasets without losing rows or exhausting connector limits.
For practitioners
- Define a stable pagination cursor Use a tuple that combines the primary sort field with a deterministic tie breaker so pages always advance through tied rows.
- Separate thin scans from full row fetches Fetch only the cursor columns and join key in the first pass, then re-fetch complete rows inside the bounded window after filtering matched keys.
- Chunk dynamic filters to connector budgets Split large join-key sets into smaller predicates when the target connector cannot accept the full filter in one request.
- Measure page size against data skew Tune page size against match rate, sort-key concentration, and connector response caps so the query starts fast and still scales efficiently.
Key takeaways
- Large federated joins fail when the engine assumes the build side can be fetched in one pass and held in memory.
- Cursor design and tie handling determine whether paging preserves both order and completeness across source limits.
- Security analytics teams need join architectures that respect connector budgets without silently dropping tied records.
Related NHI Mgmt Group resources: Security Requirements and Abuse Cases Guide · Workforce Identity Security Guide · ITDR RFP Template
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | DE.CM-01 — Monitoring for Anomalies, Events, and Potential Threats | Federated security analytics rely on complete, timely detection data across source systems. |
| Recommendation — Design correlation workflows so monitoring data can be retrieved completely enough to support anomaly detection. | ||
| NIST SP 800-53 Rev 5 | AU-6 — Audit Record Review, Analysis, and Reporting | The post is about joining log and detection records at scale for analysis. |
| Recommendation — Tune audit analysis pipelines so large log joins remain complete and reviewable under source caps. | ||
| CIS Controls v8 | CIS-8 — Audit Log Management | Large-scale log joins support audit log management and downstream analysis. |
| Recommendation — Preserve audit log completeness when federating across sources with different query limits. | ||
Key terms
- Federated Query Execution: The process of running a single investigative hypothesis across multiple data sources at the same time. In security operations, this matters because attacker behaviour is often only visible when SIEM, EDR, identity, and threat intelligence data are correlated together.
- Keyset Pagination: Keyset pagination is a paging method that uses the last seen sort values to fetch the next page of results. It avoids OFFSET scanning by comparing rows against a cursor condition, usually on an ordered and indexed column set, so pages stay stable as data changes.
- Dynamic Filtering: Dynamic filtering is a query optimisation that uses values from one side of a join to restrict the rows scanned on the other side. It works by pushing a runtime filter, often a set of join keys, into the scan so the engine reads less data and reduces join cost.
- Tie Breaker Column: A tie breaker column is an extra ordering field used to make a sort order unique when the primary sort key has duplicates. It is paired with the main sort column in pagination or ordered queries so the engine can decide a consistent row sequence and avoid ambiguous page boundaries.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, secrets management, and identity lifecycle control. It is useful for practitioners who need to connect access design, operational controls, and governance across security programmes.
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org