public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: [email protected] <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Re: what's the meaning of key?
Date: Sun, 5 Feb 2023 10:22:05 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On 05/02/2023 06:09, [email protected] wrote:
> I'm doing research on heap_am, and for heap_beginscan func, I find
> out that there is a arg called nkeys, I use some sqls as examples like
> 'select * from t;' and 'select * from t where a = 1', but it is always
> zero,
> can you give me some descriptions for this? what's it used for?
The executor evaluates table scan quals in the SeqScan node itself, in
ExecScan function. It doesn't use the heap_beginscan scankeys.
There has been some discussion on changing that, as some table access
methods might be able to filter rows more efficiently using the scan
keys than the executor node. But that's how it currently works.
I think the heap scankeys are used by catalog accesses, though, so it's
not completely dead code.
- Heikki
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: what's the meaning of key?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox