Re: Stats collector eats my CPU

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wstrzalka <wstrzalka(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Stats collector eats my CPU
Date: 2008-10-08 13:05:35
Message-ID: 27831.1223471135@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

wstrzalka <wstrzalka(at)gmail(dot)com> writes:
> the 15483 process is stats collector. At the moment server is almost
> idle but the stats collector is constantly taking 15-17% of CPU.

> I don't know if it matters at all, but maybe the reason is that the
> cluster is very large in the term of relation number (many schemes
> with identical table set).

> select count(*) from pg_class;
> count
> --------
> 257477

Ouch. You might want to consider a schema redesign. Usually, if you've
got a lot of tables with the same column-set, it's better to combine
them into one big table with an additional key column.

I'm sure the stats collector runtime is directly tied to having so many
tables --- it's trying to keep stats on each one of them individually.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2008-10-08 13:24:04 8.4 RPMs
Previous Message Dejan Dimic 2008-10-08 12:57:32 Re: how to use pam-pgsql