Re: pg_upgrade and statistics - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: pg_upgrade and statistics
Date
Msg-id 4F5F5492020000250004623F@gw.wicourts.gov
Whole thread Raw
In response to Re: pg_upgrade and statistics  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_upgrade and statistics  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: pg_upgrade and statistics  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> wrote:
> On Tue, Mar 13, 2012 at 01:18:58PM -0500, Kevin Grittner wrote:
>> cir=# analyze "CaseHist";
>> ANALYZE
>> Time: 143450.467 ms
>> cir=# select relpages, reltuples from pg_class where relname =
>> 'CaseHist';
>>  relpages |  reltuples  
>> ----------+-------------
>>   3588659 | 2.12391e+08
>> (1 row)
>>  
>> Either way, there are about 500 tables in the database.
> 
> That is 2.5 minutes.  How large is that database?
cir=# select pg_size_pretty(pg_database_size('cir'));pg_size_pretty 
----------------2563 GB
(1 row)
In case you meant "How large is that table that took 2.5 minutes to
analyze?":
cir=# select pg_size_pretty(pg_total_relation_size('"CaseHist"'));pg_size_pretty 
----------------44 GB
(1 row)
I've started a database analyze, to see how long that takes.  Even
if each table took 1/4 second (like on the small database) with over
500 user tables, plus the system tables, it'd be 15 minutes.  I'm
guessing it'll run over an hour, but I haven't timed it lately, so
-- we'll see.
-Kevin


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)
Next
From: Robert Haas
Date:
Subject: Re: patch for parallel pg_dump