From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: [PATCH] Support SK_SEARCHNULL / SK_SEARCHNOTNULL for heap-only scans |
Date: | 2023-02-22 09:29:38 |
Message-ID: | 6dbf8f2c-b70e-9b4f-1ecb-504280659348@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 14/02/2023 11:10, Aleksander Alekseev wrote:
> Hi Andres,
>
>> Shouldn't need to extract the column if we just want to know if it's NULL (see
>> heap_attisnull()). Afaics the value isn't accessed after this.
>
> Many thanks. Fixed.
I'm confused, what exactly is the benefit of this? What extension
performs a direct table scan bypassing the executor, searching for NULLs
or not-NULLs?
If heapam can check for NULL/not-NULL more efficiently than the code
that calls it, sure let's do this, and let's also see the performance
test results to show the benefit. But then let's also modify the caller
in nodeSeqScan.c to actually make use of it.
For tableam extensions, which may or may not support checking for NULLs,
we need to add an 'amsearchnulls' field to the table AM API.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Jones | 2023-02-22 09:35:59 | Re: [PATCH] Add pretty-printed XML output option |
Previous Message | Heikki Linnakangas | 2023-02-22 09:18:57 | Re: refactoring relation extension and BufferAlloc(), faster COPY |