Re: Getting pg_stat_database data takes significant time - Mailing list pgsql-general

From Magnus Hagander
Subject Re: Getting pg_stat_database data takes significant time
Date
Msg-id CABUevExunNP4NXwDzKokqVyNhFHopL+VPKMyXTO8on5aXegiwQ@mail.gmail.com
Whole thread Raw
In response to Re: Getting pg_stat_database data takes significant time  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: Getting pg_stat_database data takes significant time
List pgsql-general
On Thu, Aug 12, 2021 at 4:38 PM hubert depesz lubaczewski
<depesz@depesz.com> wrote:
>
> On Thu, Aug 12, 2021 at 11:32:15AM +0200, Magnus Hagander wrote:
> > Which database are you connected to? If you just want to look at the
> > global stats, it might help to be connected to a database that is
> > *not* the one with all the tables in -- e.g. connect to "postgres" and
> > query pg_stat_database looking for values on a different database? In
> > this case it would open files for "global", for "database postgres"
> > and "shared relations" only and skip the file for your db with many
> > objects. I think.
>
> I'm connected to the db I need data about, and I need data from virtualy
> all columns of pg_stat_database.

Try connecting to a different database, while still querying all columns.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: Getting pg_stat_database data takes significant time
Next
From: Mladen Gogala
Date:
Subject: log_statement GUC parameter