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 1kWyJ7-0002o8-Vm for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Oct 2020 08:56:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kWyJ5-0001KZ-TN for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Oct 2020 08:56:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1kWyJ5-0001KR-MH for pgsql-hackers@lists.postgresql.org; Mon, 26 Oct 2020 08:56:47 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1kWyJ3-0006mt-Bu for pgsql-hackers@lists.postgresql.org; Mon, 26 Oct 2020 08:56:47 +0000 Received: by mail-wm1-x341.google.com with SMTP id e2so11620516wme.1 for ; Mon, 26 Oct 2020 01:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IRDIXhmt5DgsTUVn4kRKI403j23itY/UpxJiYeBs1Lc=; b=V8DY4QPab/oJgMm7LtlErE2zyRO/vcPMovf8CSnAusLqkO7Z7tLa4udnNOopJcXrx0 TKFuSeICg9vTBWFVPMIoZCDj6cVW8EohQkXw/pwrY1NXrp1krcvCPinXf2FWHneTaXkn T6uhr6uj/lynEGZbQpYcl9SUZW1igoxtHNqnArEkZimnnfyDoYq38Q3NIb2QN0Nd/aCC Xxzbub83LTKt1jSh+BOzI/rca5tWVOHaik07BD4wn5yfHD5RGYLSv92rQ1anlenc2+Ye GnN//lhgo2vnWQ5uofpjG2qxTcNpU+oBBe60XrCnbuFOp1sRzBvnZWEVZTuF3dyK6ssq 52EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IRDIXhmt5DgsTUVn4kRKI403j23itY/UpxJiYeBs1Lc=; b=bMlToa4bdlAYi5qpVewPUAO8CAnKzD3jHdgx1yjHziRQhsDRGUgeN1MyPZh/VaGnEG dmU4ePdlBNh6MhmyxmeZBppcOxwSa8/vsiLf5fcx83u5AxGWOcq2Oj68R7LzRLXsoEwQ 4+KZ00NT1qVYQvuKbthBkVnxTgCJRG3kK7B1zSxoxD0DMNdu1pSNqsUPl1pbk+8mGmOq Z95Tb4mUI/bK5P+IZM0OBvhvCz5dMPpSJJeH9u841a1tR7E/EjqiH5WO3HGJ44bHWkfS kX66JJo1ZU6fcr0mb91sfijo8OYYXWC9tCffSJ8nWEmT17wwuLdMgM10m/XykG4+ZNaJ DRQg== X-Gm-Message-State: AOAM530YLtBR6nlyIyaCutly1f/C8irzhic3OKYiq+ovjKS1e5wgYQqP uXElsVTm4JdCX6JR3QUBahs= X-Google-Smtp-Source: ABdhPJwxkI0oQoMFWRHwXAnuhgBJ9SdeC/77dvYUSGCtuOGelkJv8D3MurYq1gID7BiVJm42ldnqNQ== X-Received: by 2002:a1c:7515:: with SMTP id o21mr3341323wmc.5.1603702604519; Mon, 26 Oct 2020 01:56:44 -0700 (PDT) Received: from localhost (dslb-178-005-232-008.178.005.pools.vodafone-ip.de. [178.5.232.8]) by smtp.gmail.com with ESMTPSA id h3sm21785850wrw.78.2020.10.26.01.56.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 01:56:43 -0700 (PDT) Date: Mon, 26 Oct 2020 09:57:21 +0100 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Pavel Borisov Cc: Tomas Vondra , Teodor Sigaev , Gavin Flower , Andres Freund , Michael Paquier , PostgreSQL Developers Subject: Re: POC: GROUP BY optimization Message-ID: <20201026085721.g6h5xljxvodnmk34@localhost> References: <20190131112407.zpbysdvghjyh4z47@alap3.anarazel.de> <20190409152100.5q25whnxs27zws5m@development> <20190503215510.bcr5ycszntqg65tw@development> <20190524225725.embuha33qvc5avz3@development> <20200514235220.xewrrwjvatxzn3g6@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Mon, Oct 26, 2020 at 12:44:58PM +0400, Pavel Borisov wrote: > > > > > > I wonder if anyone has plans to try again with this optimization in v14 > > cycle? The patches no longer apply thanks to the incremental sort patch, > > but I suppose fixing that should not be extremely hard. > > > > I found this feature interesting and I'd like to join. > PFA the updated version of the patch made fully compatible with changes in > v13 and I suppose it is ready to be reviewed for v14. > > Main things changed: > 1. Patch is made compatible with new lists representation ( 1cff1b95ab6d ) > 2. Patch is made compatible with the incremental sort ( d2d8a229bc58 and > ba3e76cc571e ) > 3. Tests are changed to represent changes in keys numbering and > naming convention in the plan ( 55a1954da16 and 6ef77cf46e8 ) > > As always your ideas are very much welcome! Hi, Thanks for your interest! FYI there is a new thread about this topic [1] with the next version of the patch and more commentaries (I've created it for visibility purposes, but probably it also created some confusion, sorry for that). [1]: https://www.postgresql.org/message-id/flat/CA%2Bq6zcW_4o2NC0zutLkOJPsFt80megSpX_dVRo6GK9PC-Jx_Ag%40mail.gmail.com