Re: [Beginner Question]What is query jumbling?

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Wen Yi <wen-yi(at)qq(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: [Beginner Question]What is query jumbling?
Date: 2023-07-17 10:59:55
Message-ID: 120a2618-86c7-e734-8eba-73b82b8aa6e9@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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's node, 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2023-07-17 11:20:13 Re: Query take a long time and use no index
Previous Message basti 2023-07-17 09:13:23 Query take a long time and use no index