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 1p2ZpS-0005O9-0z for pgsql-admin@arkaria.postgresql.org; Tue, 06 Dec 2022 15:25:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p2ZpQ-0000kn-QH for pgsql-admin@arkaria.postgresql.org; Tue, 06 Dec 2022 15:25:52 +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 1p2ZpQ-0000ke-D2 for pgsql-admin@lists.postgresql.org; Tue, 06 Dec 2022 15:25:52 +0000 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p2ZpO-0001Tt-B1 for pgsql-admin@lists.postgresql.org; Tue, 06 Dec 2022 15:25:52 +0000 Received: by mail-qk1-x731.google.com with SMTP id z1so7684773qkl.9 for ; Tue, 06 Dec 2022 07:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ii2jR429Fa8aVb9Yhg5Cr3KRwBQrKH4uuFQhPxe4T7U=; b=QpNVnr9HvGFHc7aHaGLbI9A98Mqij5dMFvAZNty26XhU4WyIbOYI6mzaqBKGHDouNN qC3kywkkVUhD3khZJEhzWJGpdeVtUbe5KfSKxHYQIlGdQrHn+IFRA3x6cZuvivEbUrzr alrjB6jAKZsUwFG9SgGvNyD0Qp4yfyVKaqHHWRxTqAi9q7D4A9OGW6kuvtSPS2C7k9RR B4KDD6d8D1DHqdy7yavZIOVeV4uwSoUjGjRWZ0mx34vKIUvrMy6uqnvWlfJWJ2nydvp0 gDGQjYkMRU+LNoTEenIbsQcSyJThsmt+p78aaB4v8GsshruYbidBG59XtOYrDWsU8plz 2HOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ii2jR429Fa8aVb9Yhg5Cr3KRwBQrKH4uuFQhPxe4T7U=; b=w8TwieaNknY/PhMkhTXqsQIzNkCd9am6iCuL/iZjFnqSn+VggPkSI4G6Iq7OuCHhj0 3yMDoAqkGySTpbGguii44m820JWovUeTywjuPt+BUyDpv5omLiFs8z4X+6KoMk94+WHb M/wzVcZgMRZqyj3OE+GQRJqwQlMEV8nq41h85KwsCIVWE/7sIS9UogpFkgnusxOWZdpB 5h9YtF1KK2umeALsTPPWJMzTSkLj7R59PMWbR2AIPht23h8oZMjKK4zmaEqbvzPMaVRW kyOQh+nEVdLVN47IDj/cH45dnxiryi5dj+ewsr995XHc8o5E9XUJgudmjEs6qRpc1y2h zRkw== X-Gm-Message-State: ANoB5pmH/FR6y94/l/yo/TAgK+6AB+S6I5V7OvKquvUkblK9QAX+8lAb ta1U0HJvCYdwAvVTb8hLO1Wtx0nzuMs= X-Google-Smtp-Source: AA0mqf4Zkd3XgEjw0TE6Kv6d3Dt22rJxhsSSKUuF1yu5eOHYDQpT8OkGZKc1IkL8mssJYpDej0oHZg== X-Received: by 2002:a05:620a:16bc:b0:6f9:fe9e:6b4e with SMTP id s28-20020a05620a16bc00b006f9fe9e6b4emr68545943qkj.510.1670340348104; Tue, 06 Dec 2022 07:25:48 -0800 (PST) Received: from ?IPV6:2600:1700:bd2c:b810::43? ([2600:1700:bd2c:b810::43]) by smtp.googlemail.com with ESMTPSA id o22-20020a05620a2a1600b006fb112f512csm15285370qkp.74.2022.12.06.07.25.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Dec 2022 07:25:47 -0800 (PST) Message-ID: <668ca86c-3e66-e3ac-3b2e-1b716ce3859f@gmail.com> Date: Tue, 6 Dec 2022 09:25:47 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: need suggestion on querying big tables Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: <3617537.1670338992@sss.pgh.pa.us> From: Ron In-Reply-To: <3617537.1670338992@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/6/22 09:03, Tom Lane wrote: > 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. The docs say that ECS is an estimate of how much cache one query can use, no?  If more than one query is running on a server at a time, then wouldn't a huge ECS confuse things? -- Angular momentum makes the world go 'round.