From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Ghislain ROUVIGNAC <ghr(at)sylob(dot)com> |
Cc: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Incomplete Explain for delete |
Date: | 2015-06-22 16:07:54 |
Message-ID: | CAKFQuwY_RYXJJJtTvRvCxfvOgT-z5_n2h+wPDLFwa7VQvZpsOg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Jun 22, 2015 at 11:47 AM, Ghislain ROUVIGNAC <ghr(at)sylob(dot)com> wrote:
> So I think explain needs an improvement as it does not show the real plan
> used when running the query.
>
> Instead of displaying:
> Delete on uniform (cost=0.000..4,489.270 rows=57,847 width=6)
> -> Index Scan using two on uniform (cost=0.000..4,489.270 rows=57,847
> width=6)
> Index Cond: ((bravo)::text = 'romeo'::text)
>
It should display something like this
> Delete on uniform (cost=0.000..4,489.270 rows=57,847 width=6)
> -> Index Scan using two on uniform (cost=0.000..4,489.270 rows=57,847
> width=6)
> Index Cond: ((bravo)::text = 'romeo'::text)
> -> Foreign Keys check
> -> Index Scan using ix_ref1 on referencing1 (cost= rows= width=)
> Index Cond: ...
> -> ...
> -> Index Scan using ix_refN on referencingN (cost= rows= width=)
> Index Cond: ...
>
>
The underlying limitation here is that the planner does not concern itself
with triggers.
There is definitely room for improvement here but this complaint by itself
is not particularly influential to me. The black-box nature of functions
makes anything more detailed than "this table has triggers" difficult -
though maybe FK check triggers could be special-cased.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-06-22 16:19:48 | Re: Incomplete Explain for delete |
Previous Message | Kurt De Cauwsemaecker | 2015-06-22 15:56:01 | psql -A parameter unalines continued data wrongly |