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 1rgiSM-007aMl-Lz for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 09:48:31 +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 1rgiSK-000mwH-NP for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 09:48:29 +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 1rgiSK-000mw9-5K for pgsql-hackers@lists.postgresql.org; Sun, 03 Mar 2024 09:48:28 +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 1rgiSF-002ccU-JP for pgsql-hackers@postgresql.org; Sun, 03 Mar 2024 09:48:27 +0000 Received: from [172.30.8.234] (unknown [172.30.8.234]) (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 818DBE2104E; Sun, 3 Mar 2024 12:48:20 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1709459301; bh=vCAg5W4JSIOWBwK9KLsExI5FUu2HL6yAE/t2nnag2jM=; h=Message-ID:Date:User-Agent:Subject:From:To:Cc:References: In-Reply-To:From; b=q8f09A6cC5m8tBfEOoPcCIRx9L3zgM2VRMPJ0EdTEf+FO8cLfczaxgJ6dxYBUGeEu n7Ibwpw2+m5Ca7tiOdRa6+1v6T/bEuYLjXGj2RLR6h5Fpp2P9mZDxM8GvWqMbv60R9 tMTZrmLrplaPkzJbMg9gsweORxVJpRyzgtm9mNzL7frhsuUqTcd/KHaARIoJdUtzk8 TkZxjHtgrOgXuJINhL4MV915J5QMGfK7/LOQbIaOEGi6MEA8bcKA+s2yoHnhISE/Hz vqE4pMp227+mqcS6Q7Ga6XxRohIcEUh1CDOydWxTUr1vi38xN6KHVyBrSh0pqLaAzB nGARKCxsBIlqg== Content-Type: multipart/alternative; boundary="------------NzR3dVVKChJSaa6K9YiVpDDI" Message-ID: Date: Sun, 3 Mar 2024 12:48:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes Content-Language: en-US From: Alena Rybakina To: Alexander Korotkov , Andrei Lepikhov , jian he Cc: 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> <5f119769-ab11-4807-abcc-71d5dd914ea0@postgrespro.ru> <21088129-7cd3-424a-bcce-6a3427ba3276@postgrespro.ru> <11ee9c04-281f-43c8-a0ff-d481c1e01c09@postgrespro.ru> <54009ba5-4aea-4344-a30d-e3558a59e2a9@postgrespro.ru> <380e5683-cdfd-4220-ab9b-7cccb9d3e480@postgrespro.ru> In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------NzR3dVVKChJSaa6K9YiVpDDI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sorry, I found explanation - https://www.postgresql.org/message-id/CACJufxFS-xcjaWq2Du2OyJUjRAyqCk12Q_zGOPxv61sgrdpw9w%40mail.gmail.com On 03.03.2024 12:26, Alena Rybakina wrote: > > I found that it was mentioned here - > https://www.postgresql.org/message-id/CACJufxFrZS07oBHMk1_c8P3A84VZ3ysXiZV8NeU6gAnvu%2BHsVA%40mail.gmail.com. > > To be honest, I couldn't find any explanation for that. > > On 01.03.2024 18:33, Alexander Korotkov wrote: >> Hi, Andrei, >> Hi, Alena! >> >> On Thu, Feb 29, 2024 at 10:59 AM Andrei Lepikhov >> wrote: >> >> On 28/2/2024 17:27, Alena Rybakina wrote: >> > 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. >> Thanks, >> I spent some time describing the feature with documentation. >> A condensed description of the GUC is in the runtime-config file. >> Feature description has spread between TransformOrExprToANY and >> generate_saop_pathlist routines. >> Also, I've made tiny changes in the code to look more smoothly. >> All modifications are integrated into the two new patches. >> >> Feel free to add, change or totally rewrite these changes. >> >> >> I'm going to review and revise the patch. >> >> One question I have yet. >> >> >        /* >> >         * Transformation only works with both side type is not >> >         * { array | composite | domain | record }. >> >> Why do we limit transformation for these types?  Also, it doesn't >> seem the current code restricts anything except composite/record. >> >> ------ >> Regards, >> Alexander Korotkov > -- > Regards, > Alena Rybakina > Postgres Professional:http://www.postgrespro.com > The Russian Postgres Company -- Regards, Alena Rybakina Postgres Professional:http://www.postgrespro.com The Russian Postgres Company --------------NzR3dVVKChJSaa6K9YiVpDDI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Sorry, I found explanation - https://www.postgresql.org/message-id/CACJufxFS-xcjaWq2Du2OyJUjRAyqCk12Q_zGOPxv61sgrdpw9w%40mail.gmail.com

On 03.03.2024 12:26, Alena Rybakina wrote:

I found that it was mentioned here - https://www.postgresql.org/message-id/CACJufxFrZS07oBHMk1_c8P3A84VZ3ysXiZV8NeU6gAnvu%2BHsVA%40mail.gmail.com.

To be honest, I couldn't find any explanation for that.

On 01.03.2024 18:33, Alexander Korotkov wrote:
Hi, Andrei,
Hi, Alena!

On Thu, Feb 29, 2024 at 10:59 AM Andrei Lepikhov <a.lepikhov@postgrespro.ru> wrote:
On 28/2/2024 17:27, Alena Rybakina wrote:
> 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.
Thanks,
I spent some time describing the feature with documentation.
A condensed description of the GUC is in the runtime-config file.
Feature description has spread between TransformOrExprToANY and
generate_saop_pathlist routines.
Also, I've made tiny changes in the code to look more smoothly.
All modifications are integrated into the two new patches.

Feel free to add, change or totally rewrite these changes.

I'm going to review and revise the patch.

One question I have yet.

>        /*
>         * Transformation only works with both side type is not
>         * { array | composite | domain | record }.

Why do we limit transformation for these types?  Also, it doesn't seem the current code restricts anything except composite/record. 

------
Regards,
Alexander Korotkov
-- 
Regards,
Alena Rybakina
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
-- 
Regards,
Alena Rybakina
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--------------NzR3dVVKChJSaa6K9YiVpDDI--