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 1sLqNd-00GsIs-99 for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2024 20:33:37 +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 1sLqNb-00BgMj-LB for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2024 20:33:35 +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 1sLqNb-00BgMb-Bt for pgsql-hackers@lists.postgresql.org; Mon, 24 Jun 2024 20:33:35 +0000 Received: from mail.nataraj.su ([168.119.121.177]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sLqNZ-003Mcw-Az for pgsql-hackers@lists.postgresql.org; Mon, 24 Jun 2024 20:33:35 +0000 Received: from thinkpad-pgpro.localnet (unknown [91.203.188.92]) by mail.nataraj.su (Postfix) with ESMTPSA id 2D2B7143892; Mon, 24 Jun 2024 23:33:31 +0300 (MSK) From: Nikolay Shaplov To: Alexander Korotkov , pgsql-hackers@lists.postgresql.org Cc: Andrei Lepikhov , jian he , Robert Haas , pgsql-hackers@postgresql.org, Peter Geoghegan , "Finnerty, Jim" , Marcos Pegoraro , teodor@sigaev.ru, Tomas Vondra , Peter Eisentraut , Ranier Vilela , Alena Rybakina Subject: Re: POC, WIP: OR-clause support for indexes Date: Mon, 24 Jun 2024 23:33:29 +0300 Message-ID: <3381819.e9J7NaK4W3@thinkpad-pgpro> Organization: Postgres Professional In-Reply-To: <196b44d5-f4e5-41a0-9a8f-9fbf26a13760@postgrespro.ru> References: <567ED6CA.2040504@sigaev.ru> <196b44d5-f4e5-41a0-9a8f-9fbf26a13760@postgrespro.ru> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3736514.aeNJFYEL58"; micalg="pgp-sha512"; protocol="application/pgp-signature" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --nextPart3736514.aeNJFYEL58 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Nikolay Shaplov Subject: Re: POC, WIP: OR-clause support for indexes Date: Mon, 24 Jun 2024 23:33:29 +0300 Message-ID: <3381819.e9J7NaK4W3@thinkpad-pgpro> Organization: Postgres Professional In-Reply-To: <196b44d5-f4e5-41a0-9a8f-9fbf26a13760@postgrespro.ru> MIME-Version: 1.0 Hi! Let me join the review process. I am no expert in execution plans, so there would not be much help in doing= =20 even better optimization. But I can read the code, as a person who is not f= amiliar=20 with this area and help making it clear even to a person like me. So, I am reading v25-0001-Transform-OR-clauses-to-ANY-expression.patch that= =20 have been posted some time ago, and especially transform_or_to_any function. > @@ -38,7 +45,6 @@ > int from_collapse_limit; > int join_collapse_limit; > > -=20 > /* > * deconstruct_jointree requires multiple passes over the join tree, be= cause we=20 > * need to finish computing JoinDomains before we start distributing qu= als. Do not think that removing empty line should be part of the patch > + /* > + * If the const node's (right side of operator expression) type > + * don't have =C3=A2=E2=82=AC=C5=93true=C3=A2=E2=82=AC=C2=9D array ty= pe, then we cannnot do the > + * transformation. We simply concatenate the expression node. > + */ Guess using unicode double quotes is not the best idea here...=20 =20 Now to the first part of `transform_or_to_any` --nextPart3736514.aeNJFYEL58 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE+sk3ebqQKlezKOi8PMbfuIHAGpgFAmZ52BkACgkQPMbfuIHA Gpj8xwgAk3O4NVDvaA1Xv0waWnaZc26R1CeCIIvGvqYXv+xKTsQzZfqnfeqbHwDM peQkEpGgE1ZaizIoHwZqfnVy//S1bvOZfj9baziWi17KNw8F12brR4aGhtWG7CcI MsDpl9BFAAvK6DkYEsG4xsP/Gjmj6AZz/MWChb8suHirbsVqpBFeD4y9eFM+RaEK xbpnHZjgk+0JnNphjxxewZL7ZN35Ay+zx6fap2hgnA46kP0QV6JS3ZVhG+XclyQe +lOu15EX960Fmd/8znx+zz+qI0VtbbKddlC5si+EY30G3G7LaN2lIYl93LV154o7 kOcfdqjrgSwhbPRSwHk3ylk2OOqHbw== =RrQr -----END PGP SIGNATURE----- --nextPart3736514.aeNJFYEL58--