Skip to main content
thoughtbot thoughtbot
  • We're live Live on Twitch!

    thoughtbot is livestreaming

    Work alongside the thoughtbot team as we collaborate with each other and our clients, live. Ask us anything, we're live right now!

  • Case Studies
  • Blog
  • Let’s Talk
We're live Live on Twitch!

thoughtbot is livestreaming

Work alongside the thoughtbot team as we collaborate with each other and our clients, live. Ask us anything, we're live right now!

Let’s get started!
View all Services
Development
  • Ruby on Rails
  • Hotwire
  • AI and Machine Learning
  • Maintenance
  • Mobile
Design
  • Shaping Sprints
  • UX, UI, and Product Design
  • Design Systems
Product
  • MVP
  • Product Management
  • Accessibility
Team and Processes
  • Team Augmentation
  • Fractional Leadership
View all Services
  • Healthcare
  • Finance
  • Insurance
View all Resources
Development
  • Tech Leadership Resources
  • Open Source
  • Books
  • The Bike Shed Podcast
  • Live Streaming on YouTube
  • Conference Talks
The business of great software
  • Playbook
  • Giant Robots Smashing Into Other Giant Robots Podcast
  • Design Sprint Guide
  • Live Streaming on LinkedIn
View all Resources

PostgreSQL Articles

Written by thoughtbot, your expert partner for design and development.

    • All Topics
    • Design
    • Development
    • Product
    • More topics
  1. Inserting State Transitions in Postgres

    An append-only status model gives you full history, but concurrent transitions can produce contradictory records. Here’s how to prevent that.

    Thiago Araújo Silva
    August 24, 2026
    • Databases
    • PostgreSQL
    • SQL
  2. Modeling State Transitions in Postgres

    Status starts as a column. Then someone asks “who was denied last Tuesday?” and the schema can’t answer. Model each status change as its own row from the start, without sacrificing read performance.

    Thiago Araújo Silva
    August 11, 2026
    • Databases
    • PostgreSQL
    • SQL
  3. Announcing Michel: A scheduling gem for health tech

    Remove bottlenecks to booking appointments by enabling self-scheduling within your app.

    Sally Hall
    February 5, 2026
    • Health Tech
    • Databases
    • Ruby On Rails
    • PostgreSQL
    • Open
    • Open Source
    • Performance
    • Web
  4. Do you really know how to ORDER BY?

    The perils of a seemingly harmless ORDER BY clause.

    Thiago Araújo Silva
    June 2, 2025
    • Rails
    • SQL
    • PostgreSQL
  5. This week in #dev (Aug 23, 2024)

    Using constraints in Postgres and querying LLMs in the terminal.

    thoughtbot
    September 2, 2024
    • This Week In Dev
    • TIL
    • PostgreSQL
    • Large Language Models
  6. Monitoring PostgreSQL on AWS RDS for slow queries

    Some helpful tips to fixing slow database queries before they become a problem.

    Olamide Olaoye
    February 29, 2024
    • AWS
    • PostgreSQL
    • Databases
    • Debugging
    • DevOps
  7. Handling external API errors: A transactional approach

    Clarifying a few possible ways to implement transactional workflows when working with external APIs.

    Thiago Araújo Silva
    January 23, 2024
    • Error Handling
    • API
    • Distributed Systems
    • Fault Tolerance
    • PostgreSQL
  8. Testing SQL Performance in PostgreSQL

    Measure query speed with Postgres’ EXPLAIN ANALYZE.

    Elisa Verna
    December 15, 2023
    • SQL
    • PostgreSQL
    • Performance
  9. Joining Postgres tables using arrays of IDs

    Some tips on how to do many-to-many SQL queries without a normal join table.

    Dave Iverson
    December 5, 2023
    • Databases
    • PostgreSQL
    • SQL
    • Prisma
    • Airtable
  10. Are your polymorphic relationships correctly enforced?

    Learn how to strike a balance between flexibility and data integrity with a partial index and validations.

    Steve Polito
    December 1, 2023
    • Web
    • Rails
    • PostgreSQL
    • Active Record
  11. Sign up to receive a weekly recap from thoughtbot

    Looking for even more ways to stay connected?
    RSS feed Check out our feeds
1 2 3 4 5 6 Next › Last »

Footer

thoughtbot
  • Services
  • Case Studies
  • Resources
  • Let's Talk
  • Our Company
  • Careers
  • Purpose
  • Blog
  • Events
  • Sponsor
  • Store
  • Mastodon
  • Bluesky
  • GitHub
  • YouTube
  • Twitch
  • Feeds
© 2026 thoughtbot, inc.

The design of a robot and thoughtbot are registered trademarks of thoughtbot, inc.

  • US: +1 (877) 9-ROBOTS
  • UK: +44 (0)20 3807 0560
  • Code of Conduct
  • Accessibility Statement
  • Privacy Policy