Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCKJl-00009v-1R for pgsql-admin@arkaria.postgresql.org; Tue, 16 Oct 2018 08:03:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gCKJj-0005ag-ES for pgsql-admin@arkaria.postgresql.org; Tue, 16 Oct 2018 08:03:03 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCKJj-0005aZ-73 for pgsql-admin@lists.postgresql.org; Tue, 16 Oct 2018 08:03:03 +0000 Received: from mx2a.mailbox.org ([2001:67c:2050:104:0:2:25:2] helo=mx2.mailbox.org) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gCKJZ-0002E9-3W for pgsql-admin@postgresql.org; Tue, 16 Oct 2018 08:03:02 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id D40DBA11E9; Tue, 16 Oct 2018 10:02:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id m9WpT-Jxfeqi; Tue, 16 Oct 2018 10:02:49 +0200 (CEST) Message-ID: <42dda8dfa0e034b8430b9d2494b42bd63d2a73ff.camel@cybertec.at> Subject: Re: effective_cache_size cfg From: Laurenz Albe To: "Ghiurea, Isabella" , "pgsql-admin@postgresql.org" Date: Tue, 16 Oct 2018 10:02:47 +0200 In-Reply-To: <1539626643680.56712@nrc-cnrc.gc.ca> References: <1539626643680.56712@nrc-cnrc.gc.ca> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ghiurea, Isabella wrote: > I am running PGSQL 10.4 on Cent OS Pg instance has ' effective_cache_size' parameter not > enabled I would like to learn what will the optimizer behavior be in this case ? > ( default is set to 4GB , I was thinking PG 's optimizer will try to use all available > OS RAM when trying to estimate a query, is this the case) You should set that parameter to the total amount of RAM available for your database. This is so that PostgreSQL has an idea how much of the operating system's file system cache is used for database files. It will only influence the estimate for nested loop joins, as far as I know: the bigger the value, the more likely PostgreSQL is to pick a nested loop join with an index on the inner side (because it thinks that the index will be in cache pretty soon). Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com