Re: slow queries on system tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: PegoraroF10 <marcos(at)f10(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: slow queries on system tables
Date: 2019-08-16 14:41:59
Message-ID: 19659.1565966519@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PegoraroF10 <marcos(at)f10(dot)com(dot)br> writes:
> Values for autovacuum and autoanalyse are Null because I did not configured
> them for system tables yet, but I´m doing vacuum manually once a week. My
> question now is why those selects varies that way.

Well, one point is that the execution time would probably vary hugely
depending on what's supplied for the parameters in

WHERE n.nspname LIKE $4 AND t.relname LIKE $5

which you haven't told us. I'm also wondering about just how many rows
get emitted by "generate_series($2, indnatts - $3)", and why that
particular part of the query makes any sense at all.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message PegoraroF10 2019-08-16 15:11:15 Re: slow queries on system tables
Previous Message Rich Shepard 2019-08-16 14:27:42 Re: Variable constants ?