RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

How to Track Down and Fix Slow Active Record SQL Queries in Rails

Scaling issues are great because it means that you have a traffic on your website. Before you decide that “Rails doesn’t scale!” and start a rewrite to some potentially more performant tech stack, maybe you should double check your database queries first. Below I describe some tools and techniques you can use to track down, diagnose and fix slow Active Record queries. [more inside]

Copycats Update - New! SQL Database Tables and ActiveRecord Models for @CryptoKitties

Hello, I’ve put together a (free, open source) SQL database schema / tables and ActiveRecord models for CryptoKitties. Still early and suggestions more than welcome on how to make it better, easier, faster, etc. The models incl. Kitty (of course), Gene, Trait and more. The idea is to make queries easy (thus, all 48 genes of a kitty in a “flat” genes tables along with all others). Find the source at the Copycats project page. Cheers. Prost. PS: You can read-in all 500000+ kitties using the Kitties on the Blockchain public dataset in comma-separated values (CSV) format in blocks of a thousand kitties each.

Loading older posts