O'Reilly logo

Ruby Performance Optimization by Alexander Dymo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tune Your Database

Your database server can be either a liability or an asset to performance. If you use one of the modern SQL databases, don’t treat it as a dumb storage mechanism. We have seen in Offload Work to the Database how rewriting Ruby code into SQL can give you one or more orders of magnitude improvement.

But equally important is having your database server tuned up for optimal performance. You’ll want to do this, because the default settings are usually inadequate, especially for PostgreSQL.

Example: Tune Up PostgreSQL for Optimal Performance

This example is relevant for you only when you have to set up the database server on your own. If you host on Heroku, then you can expect your PostgreSQL to be configured reasonably well. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required