The Wire · Showcase
Rails cuts schema cache dumps in half for large databases
By RepoJournal · Filed · About Rails
The columns method now batches table reads instead of hammering the database one table at a time, slashing statements by 50 percent on schema dumps.
Rails merged a critical optimization [1] that rewrites how the schema introspection layer reads column metadata. The columns method now accepts a list of tables, collapsing what was 250 separate database statements into a fraction of that load on large databases. This is a follow-up to earlier schema reader work [1] that systematically eliminated the per-table tax. The merge also includes fixes for initializable collection delegation [2], file field tag accept arrays [3], and documentation cleanup [4]. Across the ecosystem, routine dependency bumps landed in tailwindcss-rails [5] and rails-html-sanitizer [6] as zizmor-action updated to bundle zizmor 1.29.0. The Rails website removed its suggestion form [7] due to bot abuse.
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull latest rails to capture the schema cache optimization on your next deploy rails/rails [plan]
- → Update zizmor-action in GitHub Actions workflows to 0.6.2 rails/tailwindcss-rails [monitor]
References
- [1] Read the columns of many tables in one query ↗ rails/rails
- [2] Merge pull request #58305 from 55728/fix-initializable-collection-delegation-require rails/rails
- [3] Merge pull request #58097 from 55728/fix-file-field-tag-accept-array rails/rails
- [4] Merge pull request #58495 from AmaraFinbarrs/fix-rails-guides-typo-in-active-record-encryption-3.7 rails/rails
- [5] build(deps): bump zizmorcore/zizmor-action from 0.6.1 to 0.6.2 in the github-actions group ↗ rails/tailwindcss-rails
- [6] build(deps): bump zizmorcore/zizmor-action from 0.6.1 to 0.6.2 in the github-actions group ↗ rails/rails-html-sanitizer
- [7] Update foundation.html rails/website