How to track and log slow queries in Ruby on Rails applications?

How to track and log slow queries in Ruby on Rails applications?

Slow SQL queries in Rails can be caught in development, before they become production fires. Using ActiveSupport::Notifications and the sql.active_record event, you build a small performance guard that logs every query above a time threshold straight to your console.

PostgreSQL indexing for newbies - Practical Guide

PostgreSQL indexing for newbies - Practical Guide

PostgreSQL indexing explained for beginners: how B-tree, BRIN, GIST, and GIN indexes work, reading EXPLAIN ANALYZE to see if they are used, maintenance and hit rate tips, and clear rules for when an index helps and when it just slows your writes down.

OJ is not as safe as you think for your JSON

OJ is not as safe as you think for your JSON

OJ speeds up JSON in Ruby, but Oj.mimic_JSON silently drops the script_safe option, opening the door to XSS, and adds time precision quirks. What its monkey patching really changes, the stability risks, and best practices for using OJ without surprises.

React Code splitting using lazy load techniques

React Code splitting using lazy load techniques

React code splitting with React.lazy and Suspense: break a growing bundle into chunks users download only when needed, with a walkthrough of lazy imports, fallback UI, and why smaller initial loads help user experience and SEO.