Why You Should Add Indexes to Foreign Key Refs in PostgreSQL
Overview When building a data model for PostgreSQL, you're more than likely to have foreign keys to define relationships between tables. When you have those foreign keys, one quick way to optimize your queries and allow them to be significantly faster is to index on those foreign key references.
