Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLWXN-0004za-5b for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 18:31:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLWWq-0004mx-CG for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 18:31:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLWWq-0004mq-5K for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2020 18:31:24 +0000 Received: from smtp03.optiver.com ([195.246.114.70]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLWWn-00027l-PV for pgsql-hackers@postgresql.org; Mon, 06 Apr 2020 18:31:23 +0000 Received: from pps.filterd (smtp03.optiver.com [127.0.0.1]) by smtp03.optiver.com (8.16.0.27/8.16.0.27) with SMTP id 036IMXPP018669; Mon, 6 Apr 2020 20:31:09 +0200 Received: from opammb0561.comp.optiver.com (opammb0561.comp.optiver.com [10.131.160.1]) by smtp03.optiver.com with ESMTP id 306fu49bmy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 06 Apr 2020 20:31:09 +0200 Received: from opammb0562.comp.optiver.com (10.131.160.2) by opammb0561.comp.optiver.com (10.131.160.1) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Apr 2020 20:31:09 +0200 Received: from opammb0562.comp.optiver.com ([fe80::a00d:5ba5:b2c8:d936]) by opammb0562.comp.optiver.com ([fe80::a00d:5ba5:b2c8:d936%17]) with mapi id 15.00.1497.006; Mon, 6 Apr 2020 20:31:09 +0200 From: Floris Van Nee To: Dmitry Dolgov <9erthalion6@gmail.com>, Dilip Kumar CC: David Rowley , Kyotaro Horiguchi , Tomas Vondra , "Peter Geoghegan" , Jesper Pedersen , "Alvaro Herrera" , Thomas Munro , James Coleman , Rafia Sabih , Jeff Janes , "bhushan.uparkar@gmail.com" , PostgreSQL-development , Alexander Korotkov Thread-Topic: Index Skip Scan [External] Thread-Index: AQHV0WvkZ26+d70o+UG0IzFaaYH0Qaf+RewAgABIWbCADOoRgIAAGMjmgAFAZACAAJNWAIAAn+WAgAAXzwCAAdZVgIABXDSAgAkdToCAAEGxAIAE+9+AgBf5jQCAB1LiAIAAdrwAgAF5IQCAAAkGAIABDxAAgAChiYCAFaINgIAA4EAAgAAvPQCAEV0pgIAAVoOAgADNggCAAFdL8P//5vMAgACOvYCAAC4QEA== Date: Mon, 6 Apr 2020 18:31:08 +0000 Message-ID: <8abe43ac82714c2f9044fb8bac0ebfd0@opammb0562.comp.optiver.com> References: <20200310123942.nse4uyd6yqtb7uyi@localhost> <20200324163919.7nwqe72xzfatix4y@localhost> <20200325085100.5fixaiteuoln4f45@localhost> <20200405161029.fpqqll7xbgfqy5na@localhost> <80ef5f0744f542b18e508fb589a6425a@opammb0562.comp.optiver.com> <20200406163941.rh3okji2rhbnptyt@localhost> In-Reply-To: <20200406163941.rh3okji2rhbnptyt@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.131.160.182] x-tm-as-product-ver: SMEX-14.0.0.1158-8.5.1020-25340.002 x-tm-as-result: No-10--19.892400-8.000000 x-tmase-matchedrid: PL66URbwWA/uo96mfIBuopzEHTUOuMX33dCmvEa6IiFJkYDIfDuRn8Wl hj9iHeVpUWwTS/VbOELGIATpXDo8s5rhRfuew8Re9FQh3flUIh4mKH/Kj46+VbEtLGRAe3PGjxg UEedJtNPoE4yIMM6cXx4hhGDOrCNFGnqsZ8sRr2KjGOtqnkAZC7mi4mJZqln3abJxhiIFjJmwli YES4e8B5y8m0WC0kH1G2S2UGsFEea1yelsbvzRUX4neC0h7SADaU4+utsGZqCe9toQ6h6LEzEsC a8g7E4hholhXgc9K7hIMc9Q4zk968mkwh31xvwaGUlF/M3Dxp+m8MsuWwAf/basXQUyGDaElGgK 23UPei+GD8x76F9IFDrx+q6idGGs7ZpdgJkP1WITWgMf45p8JnhejHrzFWVAhAGfvGH09D1knbe HB+jJG5L8B3kZSeohKmcnW5P6fXNwf8MFxSHWbKzHDCtzZvHZy6ZbL0nhex5aS+dwPO2iW85RiA aHHmfmiVMxUlnsZnBftuJwrFEhTVQAAzJkx/So3QfwsVk0UbslCGssfkpInQ== x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No x-tmase-result: 10--19.892400-8.000000 x-tmase-version: SMEX-14.0.0.1158-8.5.1020-25340.002 x-tm-snts-smtp: 97B66255433CDC86B5844757A65845064470BBA5484CE987D16DFC1911E559E42000:8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: Index Skip Scan X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-06_09:2020-04-06,2020-04-06 signatures=0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >=20 > Hm, I wasn't aware about this one, thanks for bringing this up. Btw, Flor= is, I > would appreciate if in the future you can make it more visible that chang= es you > suggest contain some fixes. E.g. it wasn't clear for me from your previou= s email > that that's the case, and it doesn't make sense to pull into different di= rection > when we're trying to achieve the same goal :) I wasn't aware that this particular case could be triggered before I saw Di= lip's email, otherwise I'd have mentioned it here of course. It's just that= because my patch handles filter conditions in general, it works for this c= ase too. >=20 > > > In the patch I posted a week ago these cases are all handled > > > correctly, as it introduces this extra logic in the Executor. > > > > Okay, So I think we can merge those fixes in Dmitry's patch set. >=20 > I'll definitely take a look at suggested changes in filtering part. It may be possible to just merge the filtering part into your patch, but I'= m not entirely sure. Basically you have to pull the information about skipp= ing one level up, out of the node, into the generic IndexNext code.=20 I'm eager to get some form of skip scans into master - any kind of patch th= at makes this possible is fine by me. Long term I think my version provides= a more generic approach, with which we can optimize a much broader range o= f queries. However, since many more eyes have seen your patch so far, I hop= e yours can be committed much sooner. My knowledge on this committer proces= s is limited though. That's why I've just posted mine so far in the hope of= collecting some feedback, also on how we should continue with the process. -Floris