Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUVgk-0007qG-H8 for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 11:49:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gUVgj-0002Ng-9M for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 11:49:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUVgj-0002NY-1M for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 11:49:57 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUVgg-0006EO-DO for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 11:49:56 +0000 Received: from [10.8.0.146] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MmDAW-1hCKsj1QcC-00iFiK for ; Wed, 05 Dec 2018 12:49:53 +0100 Subject: Re: surprising query optimisation To: pgsql-general@lists.postgresql.org Newsgroups: gmane.comp.db.postgresql.general References: <03a0af57-3ebc-5501-10ef-6a639c7c34b8@withers.org> <20181128224950.GS3415@tamriel.snowman.net> <5d7f8d97-32f3-fd88-44cc-948673579a71@withers.org> <20181130153327.GA3415@tamriel.snowman.net> <9a952022-82b1-a88d-07fb-72c47bc0f875@archidevsys.co.nz> <6ba91527-e19e-d6f1-8273-1561cdaba2ad@withers.org> From: Thomas Kellerer Message-ID: <2c20b0ef-afc2-d1c9-8304-dab751375269@gmx.net> Date: Wed, 5 Dec 2018 12:49:53 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: <6ba91527-e19e-d6f1-8273-1561cdaba2ad@withers.org> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:h+DwqPPKPMiJx81C9Y0lTxHoKFhpF2o1KQK5/KioQl65AboEjjJ 2/O0M+wZmWFupitwdqCBdbMYJbprMAHOeH427cTEd4AJRWTVvtOQCCaIcJGYwMY+dzk4atw qD4HJbXisSPb3kwnWSXiLDhIvDA4n+XRTE9Y8dfbMZOSR36uc2PGKycYv+LMVuM3GCqtCDj nw4k1pKn8/Vsyg+R+O1zQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:zMUVD+7v7rA=:DhCNlwxiw8xLjiI2ag5lwz W2eYAjKxPTvj0sQlh/p4H+35mDatUhF2x6YQ9JLdTH30gHHLD4v0OAHmwuQKZXGIKKHgkFFmJ Wm+MkN74bqxiqyRQbDWkF+KmoKfmi5dVZm2jQT8PgLEqVCrqMvIkx2PDeUmCT+Eu7SHumnyA/ q0vN61Sd/giv0XtKVXpjdFNiKkOhFj4PVMDX8wMJpAO36SRAOzwTF29vLqHcPQCz6hgejYvg4 6oQVMTT8v7tUef5r8LVA4jsPMp8hBaaWooPQEGb7plQPmb4Ho20BBf6w13+Tlh1qeG52I8VRy TF8wvBDpWuQd7hC5Z8WkkCGC9H8MuwOyoluqGgJxHm9hRlIYuiIF1nwDQjT0oPcHdO6ZJmWcP HHx8KJRhdwvWcYJ8cKvcdtWGpiHuGcKlxsqaIQ8VHJiLy44cfewY0+PCmEJ7sF/6NIwiWt5VJ 63+Bw6SJXO6EXgzKtyQAtGI5IOBcsUSG56drqOwMaE6hVRrJ4V3K118eXfd7rS1kG1G6AutQx HO20PJW1cVXU9kPez/5UIjgCUnoQ2oaI5gDp1eAfxq0RpVWO6TcUpPgqNj9zb/fM8vm0ZppwI Lal6wkFPL2foYgTFsCHh+6rYUrCQ3yUgsXaKbRGR4+uITOrEVX/KQykftJm6LO2ALWwOVi1Do AVusVLhg7G//JAr3yHRNaK0dIox+2Ac3AyNyZwDg0L4NaMLSntNOzWBUkwHZaLABSWxnM8FcC nnWOP5sLBYVCvKhbGSalOSSRvyesk7TIQJYiTLmD09jm6Uvuy86nOOcGePk= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Chris Withers schrieb am 05.12.2018 um 12:42: > So, interestingly, this box has 250GB memory in it, and even though > I've set effective_cache_size to 200GB, I only see 9G of memory being > used. How can I persuade postgres to keep more in memory? effective_cache_size is a hint to the optimizer on how much data is to be expected to be cached (by the filesystem). Only shared_buffers (and work_mem) will actually allocate memory from the operating system. Thomas