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 1pNJJf-0007rb-Ec for pgsql-performance@arkaria.postgresql.org; Wed, 01 Feb 2023 20:02:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pNJJe-0008V4-BN for pgsql-performance@arkaria.postgresql.org; Wed, 01 Feb 2023 20:02:46 +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 1pNJJd-0008Ud-Th for pgsql-performance@lists.postgresql.org; Wed, 01 Feb 2023 20:02:46 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pNJJa-0006Us-OA for pgsql-performance@lists.postgresql.org; Wed, 01 Feb 2023 20:02:44 +0000 Received: by mail-io1-xd33.google.com with SMTP id l128so3381121iof.2 for ; Wed, 01 Feb 2023 12:02:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=NPUrGrBWnAjyNyxYpoCXQy9Aj9Kk6glQQvBwWKn76QE=; b=dM/R0PkMh1OdmsSpgaCvMU1ptByfhXtIdSJ85sqv1FU2ROWCVV31OF5B2kcpKt4KUF R50OYb2fRQ6h4u76Z6VTPuTnAFKsPXqAdBJ24deCizlLPGPkVLiTXFZuMjgIe5g5SEjA I2MwO/bP7xEW87BPeKqpVeIsaFfQxbBkKGkllMzLJhi4fnYRiC7aXfSQuqXpr/3R1xUO u7tDyEbhjv7IpOQZLBIF+NOr5E/FE3P+HjGBglkhyYt7t2NLbao6hEcT3NAGYHO+Q/vx YhYeEz+wtIYgGjvUOOlUapQWDhIOf4P/OBHDS3Kia4t9kN16nx2WRqr3SjMo0KOfGX4N sxxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NPUrGrBWnAjyNyxYpoCXQy9Aj9Kk6glQQvBwWKn76QE=; b=YswENLHOMcCw0k5Bw7U8J9adBB5VC3CLQPM+LRmF2ZkAsatuJ6lvZdFJwyT3CWQWSo /TZeQiX+pUJnmxOvd+8I613aDM7QGTVifvOxnCmVkf1DuSPcTKjiP87ozWv9ZSKL2YDU 6hH+c0HLvIeEoVtbV239hQpzKmwgAMKFuHUnsA1wbrQzyzaBf9yKpU27ZLldzzH2l+Wp pFjy5IUB7ZysH3a2WnGeFA68oKd3JEws82d6ZICUVu5oeOAgWE98MjTXEjT+L73AKVav GKfB/znlzS82QDS3po9Y2nukwJWN7RSJ5uFjcbNBFkZVq2pCUHi8uFsNPOPDCQOLTT9z bRzA== X-Gm-Message-State: AO0yUKVfsE0P6Ak/rqcaDTLdkmKHHNqWfYs8VKSxccdgAAdilsB60BK2 u5JfjNV+oxpsb/gjjTwGHki2nw== X-Google-Smtp-Source: AK7set9YEWL2Igc1Yp5oJ06O7UnVZllDye3VHLXSpI+uLAxejl7xm2S/QHMZCa+IjpE2bI0TMeskVA== X-Received: by 2002:a05:6602:38e:b0:717:fa6c:4ee2 with SMTP id f14-20020a056602038e00b00717fa6c4ee2mr2329156iov.19.1675281761419; Wed, 01 Feb 2023 12:02:41 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id r6-20020a02c846000000b0039d724c2416sm6022472jao.134.2023.02.01.12.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 12:02:40 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id C4EDB800778; Wed, 1 Feb 2023 14:02:39 -0600 (CST) Date: Wed, 1 Feb 2023 14:02:39 -0600 From: Justin Pryzby To: Alex Kaiser Cc: David Rowley , ranier.vf@gmail.com, pgsql-performance@lists.postgresql.org Subject: Re: Getting an index scan to be a parallel index scan Message-ID: <20230201200239.GV22427@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Feb 01, 2023 at 11:22:47AM -0800, Alex Kaiser wrote: > I've never messed around with extended statistics, but I'm not sure how > they would help here. From what I've read they seem to help when your query > is restricting over multiple columns. Since this query is only on one > column I'm not sure what a good "CREATE STATISTICS ..." command to run > would be to improve the query plan. Any suggestions? They wouldn't help. It seems like that was a guess. > As for how I found 'force_parallel_mode', I think I found it first here: > https://postgrespro.com/list/thread-id/2574997 and then I also saw it when > I was searching for 'parallel' on https://postgresqlco.nf . Yeah. force_parallel_mode is meant for debugging, only, and we're wondering how people end up trying to use it for other purposes. http://rhaas.blogspot.com/2018/06/using-forceparallelmode-correctly.html Did you try adjusting min_parallel_index_scan_size / min_parallel_table_scan_size ? -- Justin