High Performance PostgreSQL for Rails (Pragmatic Bookshelf)

PragmaticBookshelf
Build fast, scalable PostgreSQL and Rails apps. Solve data growth, quality, and reliability challenges, for workloads from consumer Internet to enterprise SaaS.

Andrew Atkinson @andatki

edited by Don N. Hagist @dhagist

Build faster, more reliable Rails apps by taking the best advanced PostgreSQL and Active Record capabilities, and using them to solve your application scale and growth challenges. Gain the skills needed to comfortably work with multi-terabyte databases, and with complex Active Record, SQL, and specialized Indexes. Develop your skills with PostgreSQL on your laptop, then take them into production, while keeping everything in sync. Make slow queries fast, perform any schema or data migration without errors, use scaling techniques like read/write splitting, partitioning, and sharding, to meet demanding workload requirements from Internet scale consumer apps to enterprise SaaS.

Deepen your firsthand knowledge of high-scale PostgreSQL databases and Ruby on Rails applications with dozens of practical and hands-on exercises. Unlock the mysteries surrounding complex Active Record. Make any schema or data migration change confidently, without downtime. Grow your experience with modern and exclusive PostgreSQL features like SQL Merge, Returning, and Exclusion constraints. Put advanced capabilities like Full Text Search and Publish Subscribe mechanisms built-in to PostgreSQL to work in your Rails apps. Improve the quality of the data in your database, using the advanced and extensible system of types and constraints to reduce and eliminate application bugs. Tackle complex topics like how to improve query performance using specialized Indexes. Discover how to effectively use built-in database functions and write your own, administer replication, and make the most of Partitioning and Foreign Data Wrappers. Use more than 40 well-supported open source tools to extend and enhance PostgreSQL and Ruby on Rails. Gain invaluable insights into database administration by conducting advanced optimizations—including high impact database maintenance—all while solving real-world operational challenges.

Take your new skills into production today and then take your PostgreSQL and Rails applications to a whole new level of reliability and performance.


Andrew Atkinson has worked as a Software Engineer with Ruby on Rails and PostgreSQL for more than a decade. At Microsoft, Groupon, and various startups, he’s built, mentored, and influenced teams, and operated and scaled systems, improving their quality and reliability. He’s presented on PostgreSQL and Ruby on Rails at conferences, appeared on podcasts, and has written for the official Ruby on Rails weblog, with the goal of helping developers solve their challenges using these powerful open source technologies.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

Latest Threads About This Book Top

douglasshuang
The book states the following: The main difference for domains compared with enums is that the NOT NULL constraint portion is part of t...
New
douglasshuang
@andatki The book states: How can we safely add UNIQUE and NOT NULL constraints to tables, though, and make sure that all rows are eve...
New
douglasshuang
@andatki The SCRUB_BATCHES procedure has an off-by-one bug that causes it to skip one row after each batch. Here is output showing the i...
New
douglasshuang
I’m having trouble understanding the intent of the start and count arguments to SUBSTR in the SCRUB_EMAIL function. I understand that we...
New
yagosansz
Hello @andatki, On Chapter 8, page 145, in the Generating Data for Experiments section, one of the paragraphs stars with the following: ...
New
AndyGauge
Title: High Performance PostgreSQL for Rails: Archiving mentions deleted_at column (p338) The sql command DELETE FROM trip_positions WH...
New
sanctusgee
@andatki The correct migration code for ruby/migration_snippet_virtual_column.rb is class AlterTempCustomers < ActiveRecord::Migrati...
New
cleaver-party
Hello @andatki , I ran into a problem with the migration suggested p. 75: class AddCheckConstraintTripsCompletedAt < ActiveRecord::M...
New
viktorianer
Dear Andrew, @andatki I found the explanation regarding the use of .includes() with a limit in the context of vehicle reservations to b...
New
martinstreicher
Please use the following format for the title of this thread (then simply delete/replace this text with the content for the thread): Tit...
New

Most Active This Week Top

douglasshuang
@andatki The book states: How can we safely add UNIQUE and NOT NULL constraints to tables, though, and make sure that all rows are eve...
New

Most Active This Month Top

Most Active This Year Top

PragmaticBookshelf
Build fast, scalable PostgreSQL and Rails apps. Solve data growth, quality, and reliability challenges, for workloads from consumer Inter...
New
viktorianer
I found it challenging to use code examples from this book, particularly because the queries containing non-printing Unicode characters. ...
New
abr
Hi, I’m reading chapter 3 (B8.0), in particular the part about cloning sequences and indexes to the scrubbed tables. This part confused ...
New
abr
Active Record supports multiple validations becoming listed out for an attribute. It took me a couple of tries to understand this, may...
New
viktorianer
@andatki I have encountered a couple of issues in the sections explaining the cloning of tables without constraints, copying all rows, a...
New
viktorianer
Dear Andrew, @andatki I found the explanation regarding the use of .includes() with a limit in the context of vehicle reservations to b...
New
AndyGauge
Title: High Performance PostgreSQL for Rails: Archiving mentions deleted_at column (p338) The sql command DELETE FROM trip_positions WH...
New
martinstreicher
Please use the following format for the title of this thread (then simply delete/replace this text with the content for the thread): Tit...
New
cleaver-party
Hello @andatki , I ran into a problem with the migration suggested p. 75: class AddCheckConstraintTripsCompletedAt < ActiveRecord::M...
New
sanctusgee
@andatki The correct migration code for ruby/migration_snippet_virtual_column.rb is class AlterTempCustomers < ActiveRecord::Migrati...
New
yagosansz
Hello @andatki, On Chapter 8, page 145, in the Generating Data for Experiments section, one of the paragraphs stars with the following: ...
New
douglasshuang
@andatki The SCRUB_BATCHES procedure has an off-by-one bug that causes it to skip one row after each batch. Here is output showing the i...
New
douglasshuang
The book states the following: The main difference for domains compared with enums is that the NOT NULL constraint portion is part of t...
New
douglasshuang
I’m having trouble understanding the intent of the start and count arguments to SUBSTR in the SCRUB_EMAIL function. I understand that we...
New

Most Active Last Three Years Top

andatki
Roshan asked: Is this useful for non Rails users? As the author, I’m biased, but I think so. While all of the application code exampl...
New
pzac
@andatki Hi, page 26 says Data cannot be split across pages. But two paragraphs later Data may not fit in a single page, may be spl...
New
tothpeter08
@andatki “If you’ve used the history command in your terminal, psql supports a similar “reverse search” by typing “ctrl-r”. Type ctrl-r,...
New
daniela
@andatki On page 171, it shows how to change the autovacuum scale factor for a particular table, eg: ALTER TABLE trips SET (autovacuum_...
New
BraisonCrece
Hi @andatki! First of all, thank you so much for this amazing book! :muscle: I’ve found something that can cause a bit of confusion. Af...
New
fidalgo
@andatki In the book, you make a reference to acts_as_paranoid, but given the simplicity and popularity: Category: Active Record Soft De...
New
andatki
Title: High Performance PostgreSQL for Rails @aapsql @andatki A reader wrote this by email. Re-posting here: Do you run clusters on y...
New
yann
Hi and thank you for this fantastic book, I ran in the following error while trying to run db/scripts/bulk_load.sh: Bulk loading 10_000...
New
ka8725
@andatki High Performance PostgreSQL for Rails - wrong code example The code description does not match the code snippet.
New
fidalgo
@andatki In this page, you mention: The Transaction Pooling Mode for PgBouncer cannot be used with Advisory Locks Can you expand a tit...
New
tothpeter08
@andatki bin/rails db:reset doesn’t work if there is no socket file locally which is the case if I’m running Postgres from a Docker cont...
New
tothpeter08
@andatki class AddTripRatingCheckConstraint < ActiveRecord::Migration[7.0] def change add_check_constraint :users, "rating >...
New
daniela
@andatki Minor typo - extra U: “To free up the space, you’ll need to VACUUUM FULL users;…” Fix: To free up the space, you’ll need to ...
New

Most Active Over Three Years Top

Get money off!

The Pragmatic Bookshelf

35% off any eBook

Simply use coupon code "devtalk.com" at checkout. See full details here.