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 1p2ZTa-0004YV-6W for pgsql-admin@arkaria.postgresql.org; Tue, 06 Dec 2022 15:03:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p2ZTZ-0002bT-3t for pgsql-admin@arkaria.postgresql.org; Tue, 06 Dec 2022 15:03:17 +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 1p2ZTY-0002bK-Q5 for pgsql-admin@lists.postgresql.org; Tue, 06 Dec 2022 15:03:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2ZTW-0001HI-T3 for pgsql-admin@lists.postgresql.org; Tue, 06 Dec 2022 15:03:16 +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 2B6F3Cr13617538; Tue, 6 Dec 2022 10:03:12 -0500 From: Tom Lane To: Ron cc: pgsql-admin@lists.postgresql.org Subject: Re: need suggestion on querying big tables In-reply-to: References: Comments: In-reply-to Ron message dated "Tue, 06 Dec 2022 08:51:21 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3617536.1670338992.1@sss.pgh.pa.us> Date: Tue, 06 Dec 2022 10:03:12 -0500 Message-ID: <3617537.1670338992@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > You've set effective_cache_size to 83%, when it should be at most 20%. I think you're confusing effective_cache_size with the size of shared buffers. It's meant to be an estimate of the total disk cache space available, in both shared buffers and OS caches. In any case, it's a fairly spongy parameter. It doesn't correspond to any allocation actually made or requested in Postgres; it just serves to tweak the planner's guesses about how expensive repeated indexscans are likely to be. 83% of available RAM might be too much, but it's probably not causing any real problems. regards, tom lane