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 1rfHAK-00Gckb-7b for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Feb 2024 10:27:57 +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 1rfHAI-009Cbh-2q for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Feb 2024 10:27:54 +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 1rfHAH-009CbZ-Lz for pgsql-hackers@lists.postgresql.org; Wed, 28 Feb 2024 10:27:54 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfHA8-001lLj-SA for pgsql-hackers@postgresql.org; Wed, 28 Feb 2024 10:27:52 +0000 Received: from [10.4.14.175] (unknown [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.rybakina@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 133CDE21105; Wed, 28 Feb 2024 13:27:42 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1709116062; bh=rEVJitHp77LbIMUJlSyGUGvj8B9WYtE9Jj1IF+pl9ag=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=PKIKMKp0D5lCFdnLeJBG9oYJdUV3RUwkARRMFXe+Gwm3NKuK1iUMXwQpMbDJI/aGg nc0N7zJHspiFEpuKmXdgI1e+OR2btvpP+tENYS8X3hXWHZ9xvIAkBWTTWRhdP37N1r yDGnev8B0a7474dN6T8cAmQfgw8iOK2yCdOIp84lsxIQnXgVZcl87CpYc75CckwwKw CBZzFGFKNg7npiT9ylFxav27JVFfIFklJxPLHIhNmyiSvJGQ6tgyduOYyXzwX3ZMhH HOIgBXWK+ugtD3bqMgfENisOD1w5tCo0qtT5SZ/mAAu0XbhtCYxS3hYrJCYZyYk6Ja sLUn8pahCnLMg== Message-ID: <54009ba5-4aea-4344-a30d-e3558a59e2a9@postgrespro.ru> Date: Wed, 28 Feb 2024 13:27:41 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes Content-Language: en-US To: jian he , Andrei Lepikhov Cc: Alexander Korotkov , Robert Haas , pgsql-hackers@postgresql.org, Peter Geoghegan , "Finnerty, Jim" , Marcos Pegoraro , teodor@sigaev.ru, Tomas Vondra , Peter Eisentraut , Ranier Vilela References: <567ED6CA.2040504@sigaev.ru> <13ad923a-33df-4b44-9e00-c9323cd4c37d@postgrespro.ru> <1cf6b382-6e27-4268-9f2a-54ada66eb2eb@postgrespro.ru> <5f119769-ab11-4807-abcc-71d5dd914ea0@postgrespro.ru> <21088129-7cd3-424a-bcce-6a3427ba3276@postgrespro.ru> <11ee9c04-281f-43c8-a0ff-d481c1e01c09@postgrespro.ru> From: Alena Rybakina In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 28.02.2024 13:07, jian he wrote: > On Wed, Feb 28, 2024 at 12:19 PM Andrei Lepikhov > wrote: >> On 26/2/2024 11:10, Alena Rybakina wrote: >>> On 24.02.2024 14:28, jian he wrote: >>>> Hi. >>>> I wrote the first draft patch of the documentation. >>>> it's under the section: Planner Method Configuration >>>> (runtime-config-query.html) >>>> but this feature's main meat is in src/backend/parser/parse_expr.c >>>> so it may be slightly inconsistent, as mentioned by others. >>>> >>>> You can further furnish it. >>> Thank you for your work. I found a few spelling mistakes - I fixed this >>> and added some information about generating a partial index plan. I >>> attached it. >> Thanks Jian and Alena, >> It is a good start for the documentation. But I think the runtime-config >> section needs only a condensed description of a feature underlying the >> GUC. The explanations in this section look a bit awkward. >> Having looked through the documentation for a better place for a >> detailed explanation, I found array.sgml as a candidate. Also, we have >> the parser's short overview section. I'm unsure about the best place but >> it is better when the server config section. > doc/src/sgml/array.sgml corresponds to > https://www.postgresql.org/docs/current/arrays.html. > this GUC is related to parser|optimzier. > adding a GUC to array.sgml seems strange. (I think). I suggest describing our feature in array.sgml and mentioning a GUC there. We can describe a GUC in config.sgml. >> 2. We should describe the second part of the feature, where the >> optimiser can split an array to fit the optimal BitmapOr scan path. > we can add a sentence explaining that: > it may not do the expression transformation when the original > expression can be utilized by index mechanism. > I am not sure how to rephrase it. Maybe like that: It also considers the way to generate a path using BitmapScan indexes, converting the transformed expression into expressions separated by "OR" operations, and if it turns out to be the best and finally selects the best one. -- Regards, Alena Rybakina Postgres Professional: http://www.postgrespro.com The Russian Postgres Company