Thread: [Beginner Question]What is query jumbling?

[Beginner Question]What is query jumbling?

From
"Wen Yi"
Date:
Hi community,
I am reading the 'Generate code for query jumbling through gen_node_support.pl' (https://www.postgresql.org/message-id/E1pMk51-000puf-55%40gemulon.postgresql.org) to understand the principle of the postgres's node, but I really don't know the meaning of the word 'query jumbling'.

Can someone provide me some advice?
Thanks in advance!

Yours,
Wen Yi

Re: [Beginner Question]What is query jumbling?

From
Tomas Vondra
Date:

On 7/17/23 05:23, Wen Yi wrote:
> Hi community,
> I am reading the 'Generate code for query jumbling through
> gen_node_support.pl'
> (https://www.postgresql.org/message-id/E1pMk51-000puf-55%40gemulon.postgresql.org) to understand the principle of the
postgres'snode, but I really don't know the meaning of the word 'query jumbling'.
 
> 
> Can someone provide me some advice?
> Thanks in advance!
> 

Stuff like this is usually explained somewhere in the code base, so "git
grep" is your friend. In this case it's probably good to read the
comment in src/backend/nodes/queryjumblefuncs.c which says:

 * Normalization is implemented by fingerprinting queries, selectively
 * serializing those fields of each query tree's nodes that are judged
 * to be essential to the query. This is referred to as a query jumble.

So "jumbling" is a process to generate a "normalized" query.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company