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 1mzXHT-0004se-DE for pgsql-performance@arkaria.postgresql.org; Tue, 21 Dec 2021 05:01:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mzXHR-0001Bk-6Z for pgsql-performance@arkaria.postgresql.org; Tue, 21 Dec 2021 05:01:41 +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 1mzXHQ-0001BZ-T9 for pgsql-performance@lists.postgresql.org; Tue, 21 Dec 2021 05:01:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzXHG-0001Vc-IL for pgsql-performance@lists.postgresql.org; Tue, 21 Dec 2021 05:01:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BL51SAC2704545; Tue, 21 Dec 2021 00:01:28 -0500 From: Tom Lane To: Justin Pryzby cc: Lars Bergeson , pgsql-performance@lists.postgresql.org Subject: Re: Query is slower with a large proportion of NULLs in several columns In-reply-to: <20211221045138.GZ17618@telsasoft.com> References: <2688019.1640051519@sss.pgh.pa.us> <20211221045138.GZ17618@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Mon, 20 Dec 2021 22:51:38 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2704543.1640062888.1@sss.pgh.pa.us> Date: Tue, 21 Dec 2021 00:01:28 -0500 Message-ID: <2704544.1640062888@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > On Mon, Dec 20, 2021 at 08:11:42PM -0800, Lars Bergeson wrote: >> Still taking 10X more I/O to read the smaller table. Very odd. > If I'm not wrong, it's even worse than that ? > It takes 20 or 30sec to run the query - but it says the associated I/O times > are ~500sec or ~6000sec ? It would help if somebody had labeled the units of I/O Time ... but I'm guessing those are microsec vs. the millisec of the other times, because otherwise it's completely wrong. regards, tom lane