Skip to content
代码片段 群组 项目
未验证 提交 e95c05db 编辑于 作者: Krasimir Angelov's avatar Krasimir Angelov 提交者: GitLab
浏览文件

Merge branch 'more-links-to-each-batch-in-background-migrations-docs' into 'master'

Minor tweaks/links for batched_background_migrations.md

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169657



Merged-by: default avatarKrasimir Angelov <kangelov@gitlab.com>
Approved-by: default avatarKrasimir Angelov <kangelov@gitlab.com>
Co-authored-by: default avatarDylan Griffith <dyl.griffith@gmail.com>
No related branches found
No related tags found
无相关合并请求
...@@ -370,10 +370,11 @@ end ...@@ -370,10 +370,11 @@ end
#### Using a composite or partial index to iterate a subset of the table #### Using a composite or partial index to iterate a subset of the table
When applying additional filters, it is important to ensure they are properly When applying additional filters, it is important to ensure they are properly
covered by an index to optimize `EachBatch` performance. [covered by an index](iterating_tables_in_batches.md#example-2-iteration-with-filters)
to optimize `EachBatch` performance.
In the below examples we need an index on `(type, id)` or `id WHERE type IS NULL` In the below examples we need an index on `(type, id)` or `id WHERE type IS NULL`
to support the filters. See to support the filters. See
[the `EachBatch` documentation for more information](iterating_tables_in_batches.md). the [`EachBatch` documentation](iterating_tables_in_batches.md) for more information.
If you have a suitable index and you want to iterate only a subset of the table If you have a suitable index and you want to iterate only a subset of the table
you can apply a `where` clause before the `each_batch` like: you can apply a `where` clause before the `each_batch` like:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册