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 1gn7iZ-0000hs-SR for pgsql-performance@arkaria.postgresql.org; Fri, 25 Jan 2019 20:04:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gn7iY-0003Bd-Nh for pgsql-performance@arkaria.postgresql.org; Fri, 25 Jan 2019 20:04:46 +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 1gn7iY-0003BV-Ey for pgsql-performance@lists.postgresql.org; Fri, 25 Jan 2019 20:04:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gn7iV-0007nl-Rs for pgsql-performance@postgresql.org; Fri, 25 Jan 2019 20:04:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0PK4bJO031320; Fri, 25 Jan 2019 15:04:38 -0500 From: Tom Lane To: "ldh@laurent-hasson.com" cc: "pgsql-performance@postgresql.org" Subject: Re: Zero throughput on a query on a very large table. In-reply-to: References: ,<29285.1548397485@sss.pgh.pa.us> ,<2201.1548439855@sss.pgh.pa.us> ,<3630.1548441241@sss.pgh.pa.us>, Comments: In-reply-to "ldh@laurent-hasson.com" message dated "Fri, 25 Jan 2019 19:06:54 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31318.1548446677.1@sss.pgh.pa.us> Date: Fri, 25 Jan 2019 15:04:37 -0500 Message-ID: <31319.1548446677@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "ldh@laurent-hasson.com" writes: > Second, here is what i found and what messed us up. > select current_setting('random_page_cost'); --> 4 > alter database "CMS_TMP" set random_page_cost=0.00000001; > select current_setting('random_page_cost'); --> 4 ???? ALTER DATABASE only affects subsequently-started sessions. > I also tried: > select current_setting('random_page_cost'); --> 4 > select set_config('random_page_cost', '0.000001', true); > select current_setting('random_page_cost'); --> 4 ???? That "true" means "local to the current transaction", which is just the one statement if you don't have a BEGIN. regards, tom lane