-
Notifications
You must be signed in to change notification settings - Fork 4
Home
low_card_tables
is a Gem that greatly improves scalability and maintainability of your database tables by breaking out columns containing few distinct values (e.g., booleans and other flags) into a separate table that's transparently referenced and used.
Think of low_card_tables
as "bitfields for ActiveRecord, but done right". It allows you to store multiple values as compactly as possible in a given database column, but using a technique that's vastly friendlier to queries, future expansion, separate analysis, and other (non-Rails) tools than actual bitfields. It works with any data that has few distinct values in the table; boolean fields are one example, but any enum
-style fields are great candidates for use.
low_card_tables
is the successor to similar, but more primitive, systems that have been in place at very large commercial websites serving tens of millions of pages a day, and in database tables with hundreds of millions of rows. The predecessor systems were extremely successful and reliable — hence the desire to evolve this into an open-source gem.
- Why use
low_card_tables
? What does it do? - What
low_card_tables
is NOT good for - Introduction: installation, getting started, migrating existing tables
- Usage: what "just works", or, for more detail: querying, method delegation, validations, migrations
- How it works: options, API, bulk operations, caching, notifications
- Support Matrix, Running Specs