Skip to content

A curated collection of gems and books for building and optimizing Rails apps with Postgres

License

Notifications You must be signed in to change notification settings

ayarotsky/awesome-rails-with-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Awesome Rails With Postgres

ActiveRecord and Postgres do a lot. These gems help them to do much more together.

Table of Contents

Gems

Performance Optimization

  • Alba – JSON serialization at warp speed
  • N+1 Control – Test for N+1 queries before they hit prod
  • bullet – Helps to find N+1 queries
  • prosopite – Helps to find N+1 queries
  • Columns Trace – Know which columns actually get used
  • Goldiloader – Automatic eager loading so you don’t have to
  • Fast Count – COUNT(*) but without the existential crisis
  • occams-record – Accelerates ActiveRecord with 3x-5x faster queries, reduced memory usage, and enhanced SQL features
  • postgresql_cursor – Efficiently paginate through large datasets using Postgres cursors
  • Rails PG Extras – EXPLAIN ANALYZE without the headaches
  • ActiveRecord Analyze – EXPLAIN ANALYZE, but make it easy
  • Passive Columns – Keep unused columns from slowing you down
  • geared_pagination – Simple, performance-focused pagination for large datasets
  • pagy – The fastest pagination gem for Ruby on Rails
  • Isolator – Detect non-atomic interactions within DB transactions

Query Enhancement

  • Hightop – GROUP BY, but make it fast
  • Groupdate – Time-based queries without the pain
  • Rollup – Incrementally aggregate data in Postgres for fast reporting
  • Neighbor – Fast nearest-neighbor search, ActiveRecord style
  • ActiveRecordExtended – Extend ActiveRecord with additional methods for common use cases, including querying and relation handling

Soft Deletes and Versioning

  • Discard – Soft deletes done right
  • logidze – Maintain an immutable history of ActiveRecord models with ease
  • audited – Track changes to ActiveRecord models and maintain a history of data modifications
  • paper_trail – Track changes to your ActiveRecord models and keep a history of all updates, deletes, and restores
  • paranoia – Soft delete support for ActiveRecord models, ensuring deleted records can be recovered

Multi-Tenancy

  • acts_as_tenant – Multi-tenancy support for Rails applications, simplifying tenant scoping

Full-text Search

  • pg_search – Full-text search with Postgres for Rails applications
  • textacular – Powerful text search for Postgres in Rails, with support for full-text and trigram search

Database Structure and Schema Management

Attributes Management

  • Measured – Keep units in check before they break things
  • awesome_nested_set – An easy-to-use gem for storing hierarchical data in ActiveRecord
  • store_model – Persist attributes on models as a serialized data column while keeping ActiveRecord’s features intact
  • ranked-model – Easily manage ranked records with ActiveRecord
  • store_attribute – Store model attributes in the database in a more structured way
  • acts-as-taggable-on – Add tagging functionality to any ActiveRecord model with ease

Caching and Indexing

Database Integrity and Data Consistency

Bulk Operations

Data Management

  • pgsync – Synchronize Postgres databases with ease, ideal for staging/production sync
  • evil-seed – Generate realistic, yet safe, dummy data for testing and development
  • Maintenance Tasks – Simplifies data migration management

Tools

  • pgcli-rails – A better Postgres console for Rails
  • pghero – Postgres performance insights

Books

About

A curated collection of gems and books for building and optimizing Rails apps with Postgres

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published