Skip to main content
thoughtbot thoughtbot
  • 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
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
  • Discovery Sprints
  • UX, UI, and Product Design
  • Design Systems
Product
  • MVP
  • Product Management
  • Accessibility
Team and Processes
  • Team Augmentation
  • Fractional Leadership
View all Services
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
  • Purpose Built
  • 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. Back to basics: psql

    The right tool for the right job, right? Well let me introduce you to psql.

    German Velasco
    March 14, 2019
    • PostgreSQL
    • SQL
    • Back To Basics
  2. Querying an Embedded Map in PostgreSQL with Ecto

    Structs and maps are easy to work with in Elixir, but if they are stored in the database as JSON and accessed via an Ecto Schema, it’s not as clear how to query them. We’re going to explore how to do that, and make it clear and easy.

    David Bernheisel
    March 9, 2018
    • Ecto
    • Map
    • Embeds One
    • PostgreSQL
    • JSON
    • Elixir
    • Query
    • Web
  3. Why Ecto's Way of Storing Embedded Lists of Maps Makes Querying Hard

    You can use PostgreSQL’s JSON data types to store embedded data on Ecto models. But the way Ecto tells you to store it might not be the best way.

    Jon Yurek
    February 16, 2018
    • Elixir
    • Ecto
    • PostgreSQL
    • JSON
  4. Better Date Manipulation in PostgreSQL Queries

    Use interval and date_trunc to make working with SQL dates easier.

    Derrick Carr
    September 19, 2017
    • PostgreSQL
    • SQL
    • Data
    • Web
  5. Querying the oldest and newest records within an SQL group

    How to find the oldest or most recent record associated with a particular foreign key.

    Jack Wilson
    September 18, 2017
    • PostgreSQL
    • SQL
    • Databases
    • Rails
  6. PostgreSQL's Foreign Data Wrapper

    Write queries that combine data from multiple sources.

    George Brocklehurst
    October 28, 2016
    • PostgreSQL
  7. Advanced Postgres Performance Tips

    What do you do when indexes aren’t enough?

    Caleb Hearth
    July 29, 2016
    • PostgreSQL
    • Databases
    • SQL
    • Performance
  8. Reading a Postgres EXPLAIN ANALYZE Query Plan

    Take a guided tour through a query plan for a “simple” SQL query.

    Caleb Hearth
    July 26, 2016
    • PostgreSQL
    • Databases
    • SQL
    • Performance
  9. Postgres Index Types

    Improve query performance by using the right index type.

    Calle Erlandsson
    April 21, 2016
    • PostgreSQL
  10. Announcing Scenic - Versioned Database Views for Rails

    Database views can improve the performance, composability, and readability of your rails application and Scenic is here to help.

    Derek Prior
    January 11, 2016
    • PostgreSQL
    • Rails
    • Web
  11. Sign up to receive a weekly recap from thoughtbot

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

Footer

thoughtbot
  • Services
  • Case Studies
  • Resources
  • Let's Talk
  • Our Company
  • Careers
  • Purpose
  • Blog
  • Sponsor
  • Mastodon
  • Bluesky
  • GitHub
  • YouTube
  • Twitch
  • Feeds
© 2025 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
  • Beware of fraudulent thoughtbot job listings Learn more
  • Code of Conduct
  • Accessibility Statement
  • Privacy Policy