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 1i1HyZ-0004lQ-4y for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2019 22:24:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i1HyX-00045n-DS for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2019 22:24:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i1HyV-0003yh-4P for pgsql-general@lists.postgresql.org; Fri, 23 Aug 2019 22:24:05 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i1HyR-0004D9-3o for pgsql-general@postgresql.org; Fri, 23 Aug 2019 22:24:01 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0A17521CDD; Fri, 23 Aug 2019 18:23:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 23 Aug 2019 18:23:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=p GLX2WNGJ9HJ2WR6alrg/IcCxhWG2phGTHsrZMKVg4A=; b=e5IQKIFp7Uw9dCVmh PEZXvFmLaFNBJ0DzU6jMXkseLAgDmn+gZG7fhKBos1YVqfLBFZm/5WvKvmXsBBST T1XtGSs88mgyvqLtHsWj/dL4LCnSwc3sws6KY9KtB9Jh8w6u/m8EQeS8komZIWLY ilWlje50jZ0QIOryHzAbyssWLjFOu2SLn8qdgGp/d2Gj1KDpBxBq40m4IZ12I+Dz D3q0pMxbq2XVXtYdYSPlbdPSJ1RygM9RR9g954YGuquDjmI+x+ZEIySn4vJ3Nvtb r+0hlTtacFS6IYBDgAr8JX08WH1KXueleT4mQ6mfOrhfwkN+BYkbEy3S+QqxWaLP EdO1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=pGLX2WNGJ9HJ2WR6alrg/IcCxhWG2phGTHsrZMKVg 4A=; b=Cx1CIW98NhbpZ5cQKm+OHXcCe+NLUIn9ZasF72yoSxERxPCuxRjxRmfMT QMOjDFT7ATf+kKjTybpyCTpsZ+n4XlGGG59Nl+GxH/1Diaz5Wb6VMds1sX2tN3N0 sBAw+a8GsG9pKjH6TjNd761ANWcLw+KPa6PMjdmzWzOsyTQKqaP1zZKhFvjQnIk4 A/fDLWnKFS08+MouLX0NgW5lnrcsOnS6BGK33Tle7W2MJgWR2hxt5shUXaQpkuiJ RwkdwpkonNbsDAuxBQmXGSdlHI23221Z7L3D/D4AH3cBV2A1SaUiZKAJ5K024lL8 vWabFmrfoS0VcDAgo/oxIVwEuJh6w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudegledgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeehnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuffhomhgrihhnpehnrggssghlvgdrtg homhdpphhoshhtghhrvghsqhhlqdgrrhgthhhivhgvrdhorhhgpdhpohhsthhgrhgvshhq lhdrohhrghenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehl uhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 4621AD6005B; Fri, 23 Aug 2019 18:23:56 -0400 (EDT) Subject: Re: slow queries on system tables To: PegoraroF10 , pgsql-general@postgresql.org References: <1565879436637-0.post@n3.nabble.com> <1565896167022-0.post@n3.nabble.com> <88609b1c-1653-6d4c-c1b4-883e109f5b93@aklaver.com> <1565963536657-0.post@n3.nabble.com> <19659.1565966519@sss.pgh.pa.us> <1565968275886-0.post@n3.nabble.com> <1566596875387-0.post@n3.nabble.com> From: Adrian Klaver Message-ID: <0eca5ab6-82cf-9768-6f09-0cb9998a1fdf@aklaver.com> Date: Fri, 23 Aug 2019 15:23:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <1566596875387-0.post@n3.nabble.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 8/23/19 2:47 PM, PegoraroF10 wrote: > Coming back to my problem, today happened again, that search comes slow. > Explaining again, auto vacuum and auto analyse for pg_* tables are not > configured one by one, so its using that defaults of scale_factor = 0.2 > and threshold = 50. Today, when that problem of speed came back, the > view pg_stat_sys_tables for pg_class table shows that it ran 415 times > autovacuum only this week and there are 75187 updates on this table. How > can I have been updated 75000 times this table only in a week ? What If you are still doing this: https://www.postgresql.org/message-id/1563909633976-0.post%40n3.nabble.com then it is not surprising. > kind of statement does an update on this table ? And why did it run 415 > times autovacuum and only 1 autoanalyse ? Can you show the actual settings in postgresql.conf for: autovacuum_analyze_threshold autovacuum_analyze_scale_factor Also do you have an include in postgresql.conf pointing to another file? I know you said they are using the defaults but the scale_factor you show above is the default for autovacuum_vacuum_scale_factor. For autovacuum_analyze_scale_factor the default is 0.1, which makes wonder. > relname seq_scan seq_tup_read idx_scan idx_tup_fetch n_tup_ins > n_tup_upd n_tup_del n_tup_hot_upd n_live_tup n_dead_tup > n_mod_since_analyze last_vacuum last_autovacuum last_analyze > last_autoanalyze vacuum_count autovacuum_count analyze_count > autoanalyze_count > pg_class 5395512 38598962913 616674711 2219978581 2243 75187 625 44008 > 169891 5645 7435 NULL 2019-08-22 19:58:48.497317 NULL 2019-08-22 > 13:03:02.770579 0 415 0 1 > > > ------------------------------------------------------------------------ > Sent from the PostgreSQL - general mailing list archive > at > Nabble.com. -- Adrian Klaver adrian.klaver@aklaver.com