Re: More efficient RI checks - take 2 - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: More efficient RI checks - take 2
Date
Msg-id 65467.1591370203@antos
Whole thread Raw
In response to More efficient RI checks - take 2  (Antonin Houska <ah@cybertec.at>)
Responses Re: More efficient RI checks - take 2
Re: More efficient RI checks - take 2
List pgsql-hackers
Antonin Houska <ah@cybertec.at> wrote:

> In general, the checks are significantly faster if there are many rows to
> process, and a bit slower when we only need to check a single row.

Attached is a new version that uses the existing simple queries if there's
only one row to check. SPI is used for both single-row and bulk checks - as
discussed in this thread, it can perhaps be replaced with a different approach
if appears to be beneficial, at least for the single-row checks.

I think using a separate query for the single-row check is more practicable
than convincing the planner that the bulk-check query should only check a
single row. So this patch version tries to show what it'd look like.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: minor doc fix - garbage in example of result of unnest
Next
From: Tomas Vondra
Date:
Subject: Re: WIP: WAL prefetch (another approach)