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 1rg4t2-0043QS-1e for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Mar 2024 15:33:24 +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 1rg4sz-00DrnR-PI for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Mar 2024 15:33:22 +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 1rg4sz-00DrnJ-Bh for pgsql-hackers@lists.postgresql.org; Fri, 01 Mar 2024 15:33:21 +0000 Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rg4sv-002LSK-OK for pgsql-hackers@postgresql.org; Fri, 01 Mar 2024 15:33:20 +0000 Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso2481373276.2 for ; Fri, 01 Mar 2024 07:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709307198; x=1709911998; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U1Hx+TdZVAgKuEMaA3vh6bu9rQrdjvsQKe0g1D+tmyk=; b=lQ4D7PRcHkzK2GXIPZnu5ADGOlQD5LPGwA73d7uUNxLlahYy6SOSnRRkCEYbm72K7y PX/JkSAGhgmp0RJIgK4762qQ04O886SJX3CgOjjNYfcVARdbCHbATZ9REDNAvrjsvCng o4ef8ELmOxh3Z2Xtxd0+e0eochGbRsm7XEQF5/nVO6xh0p6ov8Cj79tNP2GuTKRppymt LoPaDMtr2eh1AtS0s9ugdoQ/Mfjqdiw0OmDyfrLzoYRdgjJ89pZ7x9uzWGnok/XH0Iwg Ir+WyFZEURl/ow1FdqfZOaZnf5r1cfEp/lJzN/oB84UYHFem4yiUtVMWaTfHizlLtN2Q 8B+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709307198; x=1709911998; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U1Hx+TdZVAgKuEMaA3vh6bu9rQrdjvsQKe0g1D+tmyk=; b=hzHWKB0dreieL9xVhcs5BmfxPbJH3fpL0DGSM9y5JPDgShCOvZVkLmIfV7mq9vev0e kgZJrcBoJ8nos4cXvmq09lNwoHe+ft30r6xPcZsX6JmVLLkobc4bYXJz2uV/ta+oDzbK m14/LIELH8QuaTf5Swu+dEsHs/M/jB5aXn5Xwx4jxbxPHM5oYyn8ceDbPSKEoIHYI8o7 4LbFEyuCE02fY+CE60+tD1lUpZTfRE78ZOqnfG9EaHs4CCACqXNWjycF055KNhje5Mwa uVEALrad2TdKEeNvWUY5IvHJ7V6RuQvHHGxtuaNZlRdnQHE5hTw4aik/7H9/9MewoM8F HFFA== X-Forwarded-Encrypted: i=1; AJvYcCWmmb7vyo4NM0yabevP47Ay9EOeZvZhxhNgf3TJnMZLxY9YTzX3envWHo4jZh33hBHCj6zl8OX0IGS71wquRMS3t+eSZ4QkZaivOwZS X-Gm-Message-State: AOJu0Yzyt1s4/y/8T61Wj399JdT3RpyXRjzfFV5N+3cZMn7HJdkzAQpC ob1MsZvaMHA8j6DD9I/ctrKQDQPVMarYKl7bLON54HhbGI9+honPbkSB8ZOMPM+LJRFOEh3XLEb ImA9GHGd2KUXlVg/d9M2WMBYn/SA= X-Google-Smtp-Source: AGHT+IEYrZDZ5EvNQGH1ziWB+XtE43R1NY/QosMpOryhtyYB937ASf641pA9PE0sScdJJxfGxU0WgmuCSVm68fos77g= X-Received: by 2002:a5b:ac1:0:b0:dc6:7e7b:47a1 with SMTP id a1-20020a5b0ac1000000b00dc67e7b47a1mr1798531ybr.27.1709307198088; Fri, 01 Mar 2024 07:33:18 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <380e5683-cdfd-4220-ab9b-7cccb9d3e480@postgrespro.ru> From: Alexander Korotkov Date: Fri, 1 Mar 2024 17:33:05 +0200 Message-ID: Subject: Re: POC, WIP: OR-clause support for indexes To: Andrei Lepikhov Cc: Alena Rybakina , jian he , Robert Haas , pgsql-hackers@postgresql.org, Peter Geoghegan , "Finnerty, Jim" , Marcos Pegoraro , teodor@sigaev.ru, Tomas Vondra , Peter Eisentraut , Ranier Vilela Content-Type: multipart/alternative; boundary="0000000000005aa94406129b1859" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005aa94406129b1859 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Andrei, Hi, Alena! On Thu, Feb 29, 2024 at 10:59=E2=80=AFAM 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 --0000000000005aa94406129b1859 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Andrei,
Hi, Alena!
On Thu, Feb 29, 2024 at 10:59=E2=80=AFAM Andrei Lepikhov <a.lepikhov@postgrespro.ru> = wrote:
On 28/2/2024 17:27, Alena Rybakina wrot= e:
> Maybe like that:
>
> It also considers the way to generate a path using BitmapScan indexes,=
> converting the transformed expression into expressions separated by &q= uot;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=C2=A0I have yet.

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

Why do we limit transforma= tion for these types?=C2=A0 Also, it doesn't seem the current code rest= ricts anything except composite/record.=C2=A0

----= --
Regards,
Alexander Korotkov
--0000000000005aa94406129b1859--