Re: EXPLAIN and FK references?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: EXPLAIN and FK references?
Date: 2023-01-12 06:13:11
Message-ID: B82BDD68-899B-4BB6-BD9F-43DEBF09BAE6@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Jan 11, 2023, at 22:07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> No, not directly, but you could look at EXPLAIN ANALYZE to see which
> of the RI triggers is eating the time. It's not going to be hard to
> figure out which one(s) are using indexed plans and which are not.

Also, IIRC, the SELECTs generated to do foreign key checks do appear in pg_stat_statements, so that might provide a guide to ones that are consuming an unusually large amount of resources.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Julien Rouhaud 2023-01-12 06:42:59 Re: EXPLAIN and FK references?
Previous Message Tom Lane 2023-01-12 06:07:26 Re: EXPLAIN and FK references?