Improve the performance of nested loop join in the case of partitioned inner table

From: Alexandr Nikulin <alexandr(dot)s(dot)nikulin(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Improve the performance of nested loop join in the case of partitioned inner table
Date: 2023-03-23 06:46:32
Message-ID: CAHdr9ueefdCCCq1mXAYfLmRgEKfhWQDCU7=XmureEAzJcOwfag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, hackers

I propose to slightly improve the performance of nested loop join in the
case of partitioned inner table.
As I see in the code, the backend looks for the partition of the inner
table each time after fetch a new row from the outer table.
These searches can take a significant amount of time.
But we can skip this step if the nested loop parameter(s) was(re) not
changed since the previous row fetched from the outer table

The draft patch is attached.

Attachment Content-Type Size
v1-0001-skip-marking-nested-loop-parameters-as-changed-if-they-was-not-cahnged.patch application/octet-stream 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-03-23 06:51:20 Re: Data is copied twice when specifying both child and parent table in publication
Previous Message Peter Eisentraut 2023-03-23 06:27:43 Re: ICU locale validation / canonicalization