Re: \d on database with a lot of tables is slow

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)skype(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: \d on database with a lot of tables is slow
Date: 2005-10-04 14:17:33
Message-ID: 20051004141733.GF40138@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 01, 2005 at 02:00:12PM -0400, Tom Lane wrote:
> I wrote:
> > It's presumably mostly in the pg_table_is_visible() calls.
>
> I did some profiling on a test case with 10000 tables, and noticed that
> a big part of the problem is that the catalog caches become entirely
> useless: almost every catcache lookup ends up going to the underlying
> tables. This is because MAXCCTUPLES in catcache.c is fixed at 5000,
> and that's not an adequate working set for this many tables. If you
> are willing to throw memory at the problem, you could try increasing
> MAXCCTUPLES (to say 50K or 100K) and see if that helps.

Out of curiosity... does catcache cache all pg_* tables? Also, at what
point would it be good to up NCCBUCKETS?
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2005-10-04 14:29:40 Re: effective SELECT from child tables
Previous Message Tom Lane 2005-10-04 14:17:27 Re: memory bug debugging