1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[備忘録][Ruby]each_sliceメソッドによる分割件数について

Last updated at Posted at 2024-10-01

each_sliceメソッドを使用して大量のデータを扱う時の、分割件数について学びがあったのでメモ

メリット デメリット
分割件数を増やす 1度に処理するデータ量が減るので、DB負荷が軽減 処理時間が遅くなる
分割件数を減らす クエリの回数が減り、効率的にデータを取得し処理時間の短縮が期待できる あまりに件数が多いと、メモリ負荷が高まる

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?