Re: Foreign key triggers - Mailing list pgsql-general

From Adam Brusselback
Subject Re: Foreign key triggers
Date
Msg-id CAMjNa7cc=B8hqRKEki6_7DN7UYuqAstOqDTnw9jaGy7WhE8zmQ@mail.gmail.com
Whole thread Raw
In response to Foreign key triggers  (Roberto Balarezo <roberto.balarezo@fit-bank.com>)
List pgsql-general
Yes, foreign keys are implemented using triggers. Here is a blog post explaining a little more: http://bonesmoses.org/2014/05/14/foreign-keys-are-not-free/

I would assume it's still got to do a seq scan even on every referencing table even if it's empty for every record since there are no indexes.  It is not free to do ~25k seq scans on that many tables.

pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: index on ILIKE/LIKE - PostgreSQL 9.2
Next
From: Boszormenyi Zoltan
Date:
Subject: PG wire protocol question