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 1oxlxt-0005Mf-Se for pgsql-general@arkaria.postgresql.org; Wed, 23 Nov 2022 09:22:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oxlxs-0000zr-Px for pgsql-general@arkaria.postgresql.org; Wed, 23 Nov 2022 09:22:44 +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 ) id 1oxlxs-0000zi-Bt for pgsql-general@lists.postgresql.org; Wed, 23 Nov 2022 09:22:44 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oxlxq-0004mQ-8O for pgsql-general@postgresql.org; Wed, 23 Nov 2022 09:22:43 +0000 Received: by mail-wm1-x32b.google.com with SMTP id o30so12616513wms.2 for ; Wed, 23 Nov 2022 01:22:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=gxmbcOhpdg8c9wh6cgcFnCeoxttbBA+Q+T2MLwXDdNA=; b=HkDk/sLe8qEsi6A+3feLMxImRDLkHuPEPWlJYS6c7sMrUJ3i1WEaqv97IJjGLDiPUK r+vu5EjWCwuVwJNZojhCdu1CXBE9f6gykNWz2dn4fvmB5Q++Y1VMBCApxKWmWy8esxAB hFl5FAkmtwdByWdOA1WIDOtLzlKEvObtWNVDG/1valSzDr6vT86g5zMAWFW42jMwuln7 cuS9zclhQxbGHvgrjF+M58jtyZgqM+Lx42DxT2TnNEL+jdGdQXL2bVjNRzrQZ9KNZsJi 9tW2sxUkKauFBVeGPxBLm1qZ/PzeyKAcDyv6Me0F5sLV5GNkvOMaMGJKKKYHLtbaS9iz a9yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gxmbcOhpdg8c9wh6cgcFnCeoxttbBA+Q+T2MLwXDdNA=; b=TPo2vZulvHH2ZIO6tImJXJmNlAhLRc4zIcCBuKKUzdCZqSsD3Ke9x40JmPxdyoIeFF EEbejWym+5R+8Sopo1M58KVWIKF+qS4U31wTCIYzp+IhTk/wS0ij7QLtIaDJ0NUvk6Io GZsXvT123BsRw7c6eWOoPRClJQozFPZEZKCzFGsjBw03VXhD29zyDaYNf0VaPdqR1e7f Xt2UanHgNwoJHHjFAUwPDcGHOVC3VbAT1L7Mz1nnVPP2XJJ1nWj7uyXtQsHDzRG8jk4Q lcpyt3cdnOQNLSFtJJdSOmXjyFSpPftn2Qspm9CFw1HNpt2bCgjfkPUbRqAcZsvLfyts 2zfA== X-Gm-Message-State: ANoB5pkDWptlakkiko0RliNInwtFUPEOmKBe9pRAw0b7myIRzSRMgoV6 jzVixu3aq5Rauc/LfiaN1B0cIA== X-Google-Smtp-Source: AA0mqf68RsgJptMkRagZJKvnbOy4xnXXoN03pR1orgDlDfcL8J2trY9mi0MXIZE5E0rv2UQ29aCk4Q== X-Received: by 2002:a05:600c:1c9a:b0:3d0:328c:769d with SMTP id k26-20020a05600c1c9a00b003d0328c769dmr1333372wms.140.1669195361499; Wed, 23 Nov 2022 01:22:41 -0800 (PST) Received: from localhost.localdomain (91-115-151-172.adsl.highway.telekom.at. [91.115.151.172]) by smtp.gmail.com with ESMTPSA id m29-20020a05600c3b1d00b003c6b7f5567csm6487443wms.0.2022.11.23.01.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 01:22:41 -0800 (PST) Message-ID: Subject: Re: Index filter instead of index condition w/ IN / ANY queries above certain set size From: Laurenz Albe To: Danny Shemesh , pgsql-general@postgresql.org Date: Wed, 23 Nov 2022 10:22:40 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2022-11-23 at 10:49 +0200, Danny Shemesh wrote: > I'm trying to understand when the planner decides to use an index condition vs an index filter I am not sure what you mean by "index filter". If you could send the result of EXPLAIN (ANALYZE, BUFFERS) for the queries, that would be most useful. Yours, Laurenz Albe