rails-query-optimization

Community

Speed up Rails queries and prevent N+1.

Authornekorush14
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill optimizes ActiveRecord queries to prevent N+1 problems and improve performance.

Core Features & Use Cases

  • Eager Loading: Load associations upfront
  • Select Only Needed Columns: Minimize data transfer
  • Batch Processing: Use find_each for large datasets
  • Query Analysis: Use explain to understand queries
  • Avoid N+1: Preload associations

Quick Start

Analyze the Rails app to identify N+1 query patterns and apply eager loading strategies (e.g., replace loops fetching associations with includes).

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: rails-query-optimization
Download link: https://github.com/nekorush14/dotfiles/archive/main.zip#rails-query-optimization

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository