Re: slow queries on system tables - Mailing list pgsql-general

From PegoraroF10
Subject Re: slow queries on system tables
Date
Msg-id 1566637922958-0.post@n3.nabble.com
Whole thread Raw
In response to Re: slow queries on system tables  (Michael Lewis <mlewis@entrata.com>)
List pgsql-general
these values were collected before vacuum analyse: select (select reltuples from pg_Class where relName = t.relName), * from pg_stat_sys_tables t where schemaname = 'pg_catalog' and relname in ('pg_class','pg_attribute','pg_index');
reltuplesrelidschemanamerelnameseq_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
9304751249pg_catalogpg_attribute224626158217864683398827851433992538177615287566100941549741444NULLNULLNULLNULL0000
1691861259pg_catalogpg_class55411403963181375763804106823167937092243751876254400816989156457435NULL2019-08-22 19:58:48.497317NULL2019-08-22 13:03:02.770579041501
873872610pg_catalogpg_index5263825336386254402465283845901602741142020809342081350NULLNULLNULLNULL0000
Then ... vacuum analyze pg_catalog.pg_index; vacuum analyze pg_catalog.pg_attribute; vacuum analyze pg_catalog.pg_class;
reltuplesrelidschemanamerelnameseq_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
9405691249pg_catalogpg_attribute225506158257064691900027854304032538177615287566940569002019-08-24 09:01:26.334472NULL2019-08-24 09:01:27.169883NULL1010
1509031259pg_catalogpg_class554200239640547448638133339231694173922437518762544008150903002019-08-24 09:01:33.1308452019-08-22 19:58:48.4973172019-08-24 09:01:33.4413552019-08-22 13:03:02.770579141511
883212610pg_catalogpg_index52639943363978127424657605659022953211420208088321002019-08-24 09:01:18.080615NULL2019-08-24 09:01:18.275907NULL1010
and this is explain before https://explain.depesz.com/s/fUNB and after https://explain.depesz.com/s/1FZR

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

pgsql-general by date:

Previous
From: Thiemo Kellner
Date:
Subject: Re: timestamp out of range while casting return value to function'sreturn type
Next
From: Karsten Hilbert
Date:
Subject: Re: timestamp out of range while casting return value to function'sreturn type