Skip to content

Update "Iterating tables in batches" docs

What does this MR do and why?

In !163461 (comment 2091976406) we noticed that batching query with LEFT JOIN is more than 2x more expensive than without. Since LEFT JOIN is not needed for the each_batch to identify id ranges, we can move LEFT JOIN to yielded relation to make the iteration less expensive.

Query plans

This MR updates an example in our docs of each_batch iteration with LEFT JOIN to suggest less expensive option.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Bogdan Denkovych

Merge request reports

Loading