From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ping Yao <ping(at)optigo(dot)net> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Help understand why DELETE is so slow |
Date: | 2023-12-05 00:43:07 |
Message-ID: | 823512.1701736987@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ping Yao <ping(at)optigo(dot)net> writes:
> Thank you for the comment. I think we do. What I found odd here is the
> Query Plan (with analyze) clearly shows the actual execution to be very
> quick, that's why I don't think it's an index problem. What do you think?
I wouldn't rule it out on that basis. Foreign key enforcement is done
by AFTER triggers, which are not part of the query plan. Having said
that, all modern versions of PG show trigger runtime as a separate
EXPLAIN output line, so slow FK checks aren't that hard to diagnose.
I agree with the other comments that this is likely a Citus-specific
issue, and that you came to the wrong place for expertise on that.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2023-12-05 02:54:50 | Re: Emitting JSON to file using COPY TO |
Previous Message | Davin Shearer | 2023-12-04 22:55:00 | Re: Emitting JSON to file using COPY TO |