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 1i1HPg-0003FC-Cb for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2019 21:48:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i1HPe-000631-IB for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2019 21:48:02 +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 1i1HPe-00062u-8R for pgsql-general@lists.postgresql.org; Fri, 23 Aug 2019 21:48:02 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i1HPb-0003Wz-2P for pgsql-general@postgresql.org; Fri, 23 Aug 2019 21:48:01 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 5F3601693B7C3 for ; Fri, 23 Aug 2019 14:47:55 -0700 (MST) Date: Fri, 23 Aug 2019 14:47:55 -0700 (MST) From: PegoraroF10 To: pgsql-general@postgresql.org Message-ID: <1566596875387-0.post@n3.nabble.com> In-Reply-To: <1565968275886-0.post@n3.nabble.com> 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> Subject: Re: slow queries on system tables MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_38658_812910558.1566596875387" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_38658_812910558.1566596875387 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 kind of statement does an update on this table ? And why did it run 415 times autovacuum and only 1 autoanalyse ? 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: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html ------=_Part_38658_812910558.1566596875387 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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 kind of statement does an update on this table ? And why did it run 415 times autovacuum and only 1 autoanalyse ?
relnameseq_scanseq_tup_readidx_scanidx_tup_fetchn_tup_insn_tup_updn_tup_deln_tup_hot_updn_live_tupn_dead_tupn_mod_since_analyzelast_vacuumlast_autovacuumlast_analyzelast_autoanalyzevacuum_countautovacuum_countanalyze_countautoanalyze_count
pg_class53955123859896291361667471122199785812243751876254400816989156457435NULL2019-08-22 19:58:48.497317NULL2019-08-22 13:03:02.770579041501


Sent from the PostgreSQL - general mailing list archive at Nabble.com.
------=_Part_38658_812910558.1566596875387--