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.96) (envelope-from ) id 1vdhQX-003cj6-0X for pgsql-performance@arkaria.postgresql.org; Thu, 08 Jan 2026 04:15:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdhQW-00HRNw-0N for pgsql-performance@arkaria.postgresql.org; Thu, 08 Jan 2026 04:15:12 +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.96) (envelope-from ) id 1vdhQV-00HRNR-2V for pgsql-performance@lists.postgresql.org; Thu, 08 Jan 2026 04:15:12 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vdhQU-005Cu5-0D for pgsql-performance@lists.postgresql.org; Thu, 08 Jan 2026 04:15:12 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-431048c4068so875555f8f.1 for ; Wed, 07 Jan 2026 20:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767845708; x=1768450508; darn=lists.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=SRIeTNahCMYXPHzvx+SOUSN27zk4ZE8d/P2a1WSGxMM=; b=gAT9ILhn9nLJEFkkvKz1v2SHpsaH4wRgOT1367AT2h2e8vJNg+C2MhlUnjGZaME5gp In7/HqQ30YWmTBTr0X4X0qzf8ZYI9yFKt+tV4G/IA1k1Gk+NsZYktCzr7anPV0k2NH7N bk5Bo7c2KieoJdnMHtL9b2IYA44vRFa2qegI3WC2aEPNyYdQDsh29b6DCm0MfRFFNzbD 4mMuLuF1sWxYBrdcROWTy2G35FSpUOWiXclTtEnyNSKkIGUN8+6lA176nuJjrnAkL+aB ROihoGp6XMVRNEVLgHqd4iQHnhcznGPtGHwIdDd61A450DNUWzu0LcYYBpb2dcsXzH+H 8/0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767845708; x=1768450508; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SRIeTNahCMYXPHzvx+SOUSN27zk4ZE8d/P2a1WSGxMM=; b=GnD13iBHCCs4ZNZz9yHgVqOpA/kic0x8TIgBA2LWmr1vy3Eb0H70+T9UXGdXwpgbND C7zFUCLrrCADKjuYP4dX4+7Zf2anZFG4+6vuE8W3V3ofL9D83NDoxZq5L8IiqbUC3wBF rhApablg5pbDc7LvonOevmsBT2pGXlmbc7nkVHdXzpZ32nNAYxDXfKeYfP9hHcWUrOdn fIsBXd8S3pcTKoYKaaH2jRuCJIdLL7lkjZmcJo9CSLqvWBK3u19qN2WVVP2eL9uEBNIv sFhNI1SqNMjkznbuscV6Ggv6/SdaWkUozmwqXk4bySqB3pU9tPQcnrudoPLTPzhfAtGD /71Q== X-Gm-Message-State: AOJu0Yx1cQIfdhv1yC1sjG7iAjkueFvHQ/HjJVxTR3LoY/ctUWVx7cas mzMKC93opNfxGI40NZXYanQwDSlQgGHiBypueEft9gEGvt399CbU0kHKs8LEkBne1uzLKREHBKW b70g+siQ4YGpkUVsSYVK4XC9IGJHR4VCDyubH X-Gm-Gg: AY/fxX6BjIgM2GWqBEKYUX816Pw5ylSyYN1AQS35xznRWZQgJweEbVsNiV62UJmfAuO WCKClUMgprNMEMjU7ZhdTYsGD3IR3vQR6W87gTy2fkvvfroWQK2/MzRlJEkR5egYjxvBcNB+M8K H6xVM6jXWu+c6fEOTHE3xqbIT9K03/+DvCR68o4UKd5DkMIGrHizA+HyUB9OriiR2AU2J1lJBG3 sWr4m7T9MWsCMK1zCgHNzW4NI0QqHCTcnjRksJiIFg4H97ko0dFHJ9u5+mHHlgwadUbtB6N3mVm /pP/eKExn1aBsyAJpOYRQujQKw6rqwMfHe+IhnG8qUXbTk0+2vY1v2i3gXnugg== X-Google-Smtp-Source: AGHT+IFvZ5D1cUo7S+S28Yn3nv09ojJ42ciaE99UbjDIowj8KmNb/eB5xKhHMS0+lKEAD8T6BL3bQ9dl/7STvXpKfbw= X-Received: by 2002:a05:6000:2906:b0:431:397:4c2b with SMTP id ffacd0b85a97d-432c3644c74mr6440747f8f.11.1767845707543; Wed, 07 Jan 2026 20:15:07 -0800 (PST) MIME-Version: 1.0 References: <71afdb09-0583-4af2-a3b3-50da4f987b9b@gmail.com> In-Reply-To: From: David Rowley Date: Thu, 8 Jan 2026 17:14:55 +1300 X-Gm-Features: AQt7F2ok1gxAm31P7ARFrjL2eHGnW70DAP1nb138ekTX0IqaZz2afhp0hVsYYvs Message-ID: Subject: Re: Unexpected planner choice in simple JOIN To: Mark Kirkwood Cc: pgsql-performance@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 8 Jan 2026 at 17:03, Mark Kirkwood wrote: > > I don't think so - while the case I posted used a hash index on the > child table, exactly the sane behaviour happens if it is a btree (I > probably should have mentioned that sorry). Background is I discovered > this while playing about with hash indexes...which I must say - someone > has done excellent work on as in this *particular cases* they are > getting me better query performance! Ok, it seems related to the min_parallel_index_scan_size GUC. If you zero that, do you get a better plan? I think the problem is that because the best form of plan for joining this tiny set of rows to the huge table is a parameterised nested loop, to parallelise that loop, you need a Parallel node on the outer side of the Nested Loop. If the index's size is below min_parallel_index_scan_size then we won't build a partial path for it. David