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 1qBD9p-0001f0-L2 for pgsql-performance@arkaria.postgresql.org; Mon, 19 Jun 2023 11:34:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qBD9o-00058W-Iv for pgsql-performance@arkaria.postgresql.org; Mon, 19 Jun 2023 11:34:52 +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 1qBD9o-00058M-8G for pgsql-performance@lists.postgresql.org; Mon, 19 Jun 2023 11:34:52 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qBD9l-0032s5-JX for pgsql-performance@lists.postgresql.org; Mon, 19 Jun 2023 11:34:51 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b45bc83f26so42777211fa.0 for ; Mon, 19 Jun 2023 04:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1687174486; x=1689766486; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=VVYQ97/HfsEnfEXskkJ/BvMLZdfcAyyJV0RStSUdNzQ=; b=ZuipPJGodAVc3QNfZC7qh4pcIBglypEbCVgDqAql9NvUEGgkP//vF64sJF/EKjUzll d0PsXryDt18FlUp6SEAsofO7O24bqzf7Fpied/pxi2eeWZL5bbN38RbAg4y5nn5g4WFk R/9cIj1aO+yK9aQmHRznjnhFxyAhWSW0NNw4tbXphLnRnQXDjh/Wq+23l9GfCN3dEDaF 06+Tvx9xeye1U3pm6rFxRpMAp47xQtLnHtKdqD0wY1l9wtJy3aaCvVKkBzYtb2hR+wIB bBrfA6iJYXAtADhtDjh+Jim//JCx71Fw6cV2fNJ9G13VSAMbemEYRNEKtqXXfRqbaqyQ S4uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687174486; x=1689766486; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VVYQ97/HfsEnfEXskkJ/BvMLZdfcAyyJV0RStSUdNzQ=; b=cHatJhz7T1U8r+elpUEgO+mObYu5cC6JFKUbWezOFFGM9Nht8KS3WVKlwS0UtuQ7c2 IVcK39cVvUpRf34uXE0Hjup1c45yZR7X4esncuRmVv1NHr67DwucERulyQPiuKU03x+M pFK14k1cW236LcdkDFSnUtCBT3rffupL1pnzOGUq1yBDuTo7Ks3uWziVSaZ+MsPBobc9 baeD1L97iAOpmEGzrcILs15tjfyIUOJ/vfQI775KpCXRDysN8RfwsaEWk4qmxU2IHDVj 74gUoaNxvHCFSoqCyk8YShSKzmsBC4h3IjuSMtJBcJfNRSeIy4N3VPwDaGAdUY1bTKm1 8odA== X-Gm-Message-State: AC+VfDx9VVzYmNZdNZm8rYsdDsndhFMTTuYrkF38Fuvqv3EjjlOHMFtC xU+JO/AWhQ3sHMgtlZd1tV+gdw== X-Google-Smtp-Source: ACHHUZ5ve/f0jLUWfFmCqHc8eAVS6FEX3SEhRQw1Lc74askU5zNv2l/zz+gBy4U8FonNOB4weslrEw== X-Received: by 2002:a2e:900a:0:b0:2b4:6195:bb26 with SMTP id h10-20020a2e900a000000b002b46195bb26mr4014353ljg.25.1687174486627; Mon, 19 Jun 2023 04:34:46 -0700 (PDT) Received: from [10.137.0.17] (ip-86-49-228-220.bb.vodafone.cz. [86.49.228.220]) by smtp.gmail.com with ESMTPSA id u10-20020a056402064a00b0051a318c0120sm3967668edx.28.2023.06.19.04.34.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jun 2023 04:34:46 -0700 (PDT) Message-ID: <95de26a3-c2cf-9e8b-de76-a14630553ff3@enterprisedb.com> Date: Mon, 19 Jun 2023 13:34:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: Merge David and Goliath tables efficiently To: nicolas paris , pgsql-performance@lists.postgresql.org References: <28172511-8297-4E6D-9DD0-421B5CF5240A@riseup.net> <516e9f9f56314f3d812615b7e6aadfa0bf45e418.camel@riseup.net> <07f2d1b3-c159-dee9-a059-1f71027fe8cd@enterprisedb.com> <0e68d4e3f09ea9cf7f55f594d8f2bf47cead3cb2.camel@riseup.net> Content-Language: en-US From: Tomas Vondra In-Reply-To: <0e68d4e3f09ea9cf7f55f594d8f2bf47cead3cb2.camel@riseup.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/18/23 22:57, nicolas paris wrote: >> ... >> Well, I kinda doubt you have 17023331531230 rows (not even physically >> possible with 2TB disk), so that's immediately suspicious. > > Below is the full plan for the strategy 2.1 (Indeed the previous email > plan was truncated and wrong, sorry for that).  > None of the plans has estimates anywhere close to 17023331531230, so where did that come from? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company