Background: This is for a Ruby on Rails web application. I have a background job which downloads recent posts from Facebook and inserts them into the database. I'm using hand-coded SQL for performance. The RDBMS is PostgreSQL (on Heroku).Background: This is for a Ruby on Rails web app