Re: how to troubleshoot a wrong query plan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jian xu <jamesxu(at)outlook(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: how to troubleshoot a wrong query plan
Date: 2023-12-27 21:21:51
Message-ID: 2746245.1703712111@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

jian xu <jamesxu(at)outlook(dot)com> writes:
> Sorry, we figured out that the PostgreSQL.conf has the nestloop disabled….that’s why It picked merge join by default
> But it might be still very helpful if there is a way to show how the plan is generated , or some debug information about the plan generating, for example in this case, if we can debug the plan and see nestloop is disable, it will be easy for us figure out the problem.

In supported releases of PG, there's the EXPLAIN (SETTINGS) option, which
will print the values of any non-default settings that affect planning.
Of course, you have to remember to use that, but it does respond to
your point.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message jian xu 2023-12-27 21:29:39 Re: how to troubleshoot a wrong query plan
Previous Message jian xu 2023-12-27 21:15:08 RE: how to troubleshoot a wrong query plan