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 1rgi77-007YcJ-NV for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 09:26:34 +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 1rgi74-000hSl-Em for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 09:26:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rgi73-000hSd-W0 for pgsql-hackers@lists.postgresql.org; Sun, 03 Mar 2024 09:26:30 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rgi6w-002XB4-OT for pgsql-hackers@postgresql.org; Sun, 03 Mar 2024 09:26:29 +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 4EC93E21130; Sun, 3 Mar 2024 12:26:20 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1709457980; bh=rpCAizG+vjEzYOfc8XgonuR0Sk0GZwN4Y3qDK1/BDso=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=01TXx+eCWbVVkzFUTwt97X3xm9p5QcZUlDfVtjtaL+g/UdEurDgDl7smj1yb5JGk2 Q7ZMVOXbKhiZyJ0tH49YNPVRJH0dfAlY1YzK3VbOWXbiiewKt5DP3m2HTLdyBQUChZ 0DJDF+y5k5C6QwiCSNoSF/qejpfQCkr5vKYf/5Ak9aYBLj9d7HudGQjMF65KscH8AC /bsq9FQiC6uF7fVuZXFNXiolqt3UZJVkTp2D5Qb7TJzcisf9XiH98zLip3+D8+g/CN OvjseQ9cACF3IdDjrrwXGh08uuF2IrfYaBAWDuEMzi9vpioLiY2bA1LstGmelnrpvT W9dcZIzWF6iVg== Content-Type: multipart/alternative; boundary="------------fXR82u7ZfJmbRf0XrHZ0te4T" Message-ID: Date: Sun, 3 Mar 2024 12:26:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes Content-Language: en-US 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> <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> <54009ba5-4aea-4344-a30d-e3558a59e2a9@postgrespro.ru> <380e5683-cdfd-4220-ab9b-7cccb9d3e480@postgrespro.ru> From: Alena Rybakina 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. --------------fXR82u7ZfJmbRf0XrHZ0te4T Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------fXR82u7ZfJmbRf0XrHZ0te4T Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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
--------------fXR82u7ZfJmbRf0XrHZ0te4T--