Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLLxV-002uaO-3w for pgsql-general@arkaria.postgresql.org; Mon, 17 Jul 2023 11:00:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qLLxT-008A3n-Ma for pgsql-general@arkaria.postgresql.org; Mon, 17 Jul 2023 11:00:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLLxT-008A3f-Bi for pgsql-general@lists.postgresql.org; Mon, 17 Jul 2023 11:00:03 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qLLxP-000t89-P7 for pgsql-general@lists.postgresql.org; Mon, 17 Jul 2023 11:00:01 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fbfa811667so33076235e9.1 for ; Mon, 17 Jul 2023 03:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1689591597; x=1692183597; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=F6+sZgSttvxkDC1sZ26huCXPvkKBqSohaaoVYqqqR3c=; b=QGlxg0y3ChHUzb46W2tWRQ9BSjtzTgArtO5qTYvgs2L+c9i0NpswMxCQXtegGnq9l4 OSD4jDdWr88jfFvOHWyRLD11zctmUdmGF2Ar7q5VXpGOfmcA7asCwIj6pXQvxmuHN/li 2hMhOaJgvieBH/Vzf7SLybeWvdSLmP/SEJMMXvNzBPZt+KNj/ANmGkXMJKQ8FX7LMw4G 7WreIDvgU6leT7EKdUjDbp4JSu5JpZ5XWyV06n9BTuOcgXb3McfJV4mgrnwfxqoxRgzS I7S7WcaFBu1SnY4qLtDxjpqxOhQ0f1BMJt8f2MVWvfsRxlK7g5tjCT0GLSR3vYao12el +dBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689591597; x=1692183597; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F6+sZgSttvxkDC1sZ26huCXPvkKBqSohaaoVYqqqR3c=; b=VXQb5YMu3p1v1WYbACzIoSYxASxn0aFmYrS2bkGe/HpDFXHTyogAW8e9ZVgL05X2Xc ROq9qr//y7MsxzoOP6o478H8dxG1y2k1G9gj9MfdtDhck4yoKg6y2e59/espumDi/8kq UiKSuTq4MI7y+srgnCtms0KCnQePgXvkIHXCwQ+bmWuQ5RDGvAQhM60VotTIQiWUBSjy vqPz4EPGkiCq4lQYJlDhunzLWRX6LAjdLTlRpZHs4zPPazDffdb35rh++1SQN3Dh+eUH xHZ0GxbwXyUQ52Y6kpeyzJCv2ZY9e4OVpgVdSpnyp/ENc485GiSs113q9q2L0/EGL34h +h0w== X-Gm-Message-State: ABy/qLaeC6EtqR88x/ahzhuKs9DOvlPqnyVsFEqipLS+72wTLAQRlDLl 8EKpSkSS55vwlxwcagxFpRZ0Rw== X-Google-Smtp-Source: APBJJlE9ELk/yUYw8Y+7wpzsLLMMwEvdQkuYb7ZrZMXeq4jgdFkhas2Zc2S6Qy9pWyviqDQhGnHqsw== X-Received: by 2002:a5d:5944:0:b0:306:3352:5b8c with SMTP id e4-20020a5d5944000000b0030633525b8cmr8093732wri.7.1689591597166; Mon, 17 Jul 2023 03:59:57 -0700 (PDT) Received: from [10.137.0.17] (ip-86-49-228-220.bb.vodafone.cz. [86.49.228.220]) by smtp.gmail.com with ESMTPSA id f14-20020adfe90e000000b0030647449730sm19089972wrm.74.2023.07.17.03.59.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jul 2023 03:59:56 -0700 (PDT) Message-ID: <120a2618-86c7-e734-8eba-73b82b8aa6e9@enterprisedb.com> Date: Mon, 17 Jul 2023 12:59:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [Beginner Question]What is query jumbling? Content-Language: en-US To: Wen Yi , pgsql-general References: From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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