---
title: "Discussion on \"What's the difference between find_each, find_in_batches,  in_batches in Rails?\" | Hashnode"
description: "Discussion on \"What's the difference between find_each, find_in_batches,  in_batches in Rails?\". Sometimes we will use klass_name.all to get records from the database.\nThat’ll be ok, if we only have 100 records in the database.\nHowever, using klass_name.all might not be the best way to get records, especially when we need to query large numbers ..."
url: "https://hashnode.com/posts/whats-the-difference-between-findeach-findinbatches-inbatches-in-rails/65c47732ab8190f7d87245b1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What's the difference between find\_each, find\_in\_batches, in\_batches in Rails?](https://lynnbright.com/whats-the-difference-between-findeach-findinbatches-inbatches-in-rails?utm_source=hashnode&utm_medium=feed)

Sometimes we will use klass\_name.all to get records from the database. That’ll be ok, if we only have 100 records in the database. However, using klass\_name.all might not be the best way to get records, especially when we need to query large numbers ...

Feb 7, 2022 · 2 min read · lynnbright.com  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)

## Written by

[Lynn Chang](https://hashnode.com/@Lynnbright)

@Lynnbright · Taipei, Taiwan

  
[View profile](https://hashnode.com/@Lynnbright)

Rails Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
