Processing data: Ruby or SQL?

Performance