Re: [PATCH] Support SK_SEARCHNULL / SK_SEARCHNOTNULL for heap-only scans
От | Heikki Linnakangas |
---|---|
Тема | Re: [PATCH] Support SK_SEARCHNULL / SK_SEARCHNOTNULL for heap-only scans |
Дата | |
Msg-id | 6dbf8f2c-b70e-9b4f-1ecb-504280659348@iki.fi обсуждение исходный текст |
Ответ на | Re: [PATCH] Support SK_SEARCHNULL / SK_SEARCHNOTNULL for heap-only scans (Aleksander Alekseev <aleksander@timescale.com>) |
Ответы |
Re: [PATCH] Support SK_SEARCHNULL / SK_SEARCHNOTNULL for heap-only scans
|
Список | 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
В списке pgsql-hackers по дате отправления: