---
title: "#activerecord articles | Hashnode"
description: "Explore 38 articles tagged #activerecord on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/activerecord"
---

Tag

# #activerecord

38 posts · 2 followers

[Yashika Vijayvargiya](https://hashnode.com/@railswithyashika) · [Jun 15](https://hashnode.com/posts/postgresql-concurrent-indexes-in-rails-avoiding-downtime-in-production/6a2fd3d893fd5e9c7afbdf9c)

### [PostgreSQL Concurrent Indexes in Rails: Avoiding Downtime in Production](https://railswithyashika.hashnode.dev/postgresql-concurrent-indexes-in-rails-avoiding-downtime-in-production?utm_source=hashnode&utm_medium=feed)

When working with large production databases, adding an index may seem like a simple migration. However, on tables with millions of records, a regular index creation can lock writes and impact your application's availability.

4 min read · [railswithyashika.hashnode.dev](https://railswithyashika.hashnode.dev/postgresql-concurrent-indexes-in-rails-avoiding-downtime-in-production?utm_source=hashnode&utm_medium=feed)

[Yashika Vijayvargiya](https://hashnode.com/@railswithyashika) · [Jun 8](https://hashnode.com/posts/rails-performance-n-plus-one-queries/6a269e18d7c32bbcc2733fbb)

### [Rails Performance Optimization: Fixing N+1 Queries with includes, preload, and eager\_load](https://railswithyashika.hashnode.dev/rails-performance-n-plus-one-queries?utm_source=hashnode&utm_medium=feed)

When working with associations in Rails, it's easy to accidentally introduce performance issues. One of the most common problems is the N+1 Query Problem. In this article, we'll understand what N+1 queries are, how they impact performance, and the differences between includes, preload, and eager\_load.

4 min read · [railswithyashika.hashnode.dev](https://railswithyashika.hashnode.dev/rails-performance-n-plus-one-queries?utm_source=hashnode&utm_medium=feed)

[Ashish Gaur](https://hashnode.com/@snyder91) · [May 30, 2025](https://hashnode.com/posts/polymorphic-associations/6839a7b4517a9985d3d6d520)

### [Polymorphic Associations](https://codingwithaglassofmilk.hashnode.dev/polymorphic-associations?utm_source=hashnode&utm_medium=feed)

What is Polymorphic Associations ? With Polymorphic Association a model can belong to more than one models with a single association. Let’s take an example, we’ll use polymorphic associations as shown in the following schema: In the above schema p...

2 min read · [codingwithaglassofmilk.hashnode.dev](https://codingwithaglassofmilk.hashnode.dev/polymorphic-associations?utm_source=hashnode&utm_medium=feed)

[Ashish Gaur](https://hashnode.com/@snyder91) · [May 30, 2025](https://hashnode.com/posts/single-table-inheritance/6839a7e84072d985bd1e558a)

### [Single Table Inheritance](https://codingwithaglassofmilk.hashnode.dev/single-table-inheritance?utm_source=hashnode&utm_medium=feed)

What is Single Table Inheritance ? Single Table Inheritance is a mechanism through which ActiveRecord can share fields and behavior between different models while using a single table. For eg. let’s say we need to create a Vehicle model and Car mod...

2 min read · [codingwithaglassofmilk.hashnode.dev](https://codingwithaglassofmilk.hashnode.dev/single-table-inheritance?utm_source=hashnode&utm_medium=feed)

[Ashish Gaur](https://hashnode.com/@snyder91) · [May 30, 2025](https://hashnode.com/posts/eager-loading/6839a31bdee19c63149364e9)

### [Eager Loading](https://codingwithaglassofmilk.hashnode.dev/eager-loading?utm_source=hashnode&utm_medium=feed)

What is Eager Loading ? Eager loading is a mechanism through which ActiveRecord loads the associated records in memory, reducing the number of executed sql queries. There are following ways to do eager loading in ActiveRecord: includes preload eag...

5 min read · [codingwithaglassofmilk.hashnode.dev](https://codingwithaglassofmilk.hashnode.dev/eager-loading?utm_source=hashnode&utm_medium=feed)

[NonStop io Technologies](https://hashnode.com/@nonstopio) · [May 15, 2025](https://hashnode.com/posts/rails-query-optimization-part-2-advanced-indexing-and-query-refactoring/68258953406d3a76bb016943)

### [Rails Query Optimization: Part 2— Advanced Indexing and Query Refactoring](https://hallucinations-in-llms-101-part-i.hashnode.dev/rails-query-optimization-part-2-advanced-indexing-and-query-refactoring?utm_source=hashnode&utm_medium=feed)

Boost Rails performance with advanced indexing, query refactoring, views, and tools to prevent memory leaks and optimize efficiency.

6 min read · [hallucinations-in-llms-101-part-i.hashnode.dev](https://hallucinations-in-llms-101-part-i.hashnode.dev/rails-query-optimization-part-2-advanced-indexing-and-query-refactoring?utm_source=hashnode&utm_medium=feed)

[NonStop io Technologies](https://hashnode.com/@nonstopio) · [Apr 29, 2025](https://hashnode.com/posts/rails-query-optimization-part-1-introduction-and-best-practices/6810a8f2cd3e413b0d4e5b02)

### [Rails Query Optimization: Part 1 — Introduction and Best Practices](https://hallucinations-in-llms-101-part-i.hashnode.dev/rails-query-optimization-part-1-introduction-and-best-practices?utm_source=hashnode&utm_medium=feed)

Learn essential Rails query optimization techniques to boost performance, reduce memory use, and scale your app efficiently.

6 min read · [hallucinations-in-llms-101-part-i.hashnode.dev](https://hallucinations-in-llms-101-part-i.hashnode.dev/rails-query-optimization-part-1-introduction-and-best-practices?utm_source=hashnode&utm_medium=feed)

[Yacine Petitprez](https://hashnode.com/@anykeyh) · [Apr 7, 2025](https://hashnode.com/posts/passive-record/67f388435de4d0f4324f96d6)

### [Passive Record](https://anykeyh.hashnode.dev/passive-record?utm_source=hashnode&utm_medium=feed)

Why We Ditched ActiveRecord Pattern

9 min read · [anykeyh.hashnode.dev](https://anykeyh.hashnode.dev/passive-record?utm_source=hashnode&utm_medium=feed)

[Abdelrahman Gamal](https://hashnode.com/@AbdelrahmanGamal) · [Feb 14, 2025](https://hashnode.com/posts/understanding-active-record-transactions-in-rails/67af52dfff7fee73eb921969)

### [Understanding Active Record Transactions in Rails](https://abdogamal.hashnode.dev/understanding-active-record-transactions-in-rails?utm_source=hashnode&utm_medium=feed)

Introduction Hey folks! Today, we’re going to have a simple and brief talk about Active Record transactions in Rails. We won’t dive too deep, but I’ll give you a glimpse of how useful they are. Active Record transactions ensure that all operations wi...

2 min read · [abdogamal.hashnode.dev](https://abdogamal.hashnode.dev/understanding-active-record-transactions-in-rails?utm_source=hashnode&utm_medium=feed)

[Renan Porto](https://hashnode.com/@tota1099) · [Nov 11, 2024](https://hashnode.com/posts/rails-active-model/6731fff970ee97ac5b68df51)

### [Rails - Active Model](https://tota1099.hashnode.dev/rails-active-model?utm_source=hashnode&utm_medium=feed)

Os devs rails amam o ActiveRecord, porém poucos sabem que podem utilizar alguns benefícios dele independente de ser um modelo de banco de dados.

2 min read · [tota1099.hashnode.dev](https://tota1099.hashnode.dev/rails-active-model?utm_source=hashnode&utm_medium=feed)
