pg_class has 3615 rows and 1010Mb in table size - Mailing list pgsql-general

From Nikola
Subject pg_class has 3615 rows and 1010Mb in table size
Date
Msg-id 180ebb40-470a-48ee-8fe2-996f0503356f@s41g2000vba.googlegroups.com
Whole thread Raw
Responses Re: pg_class has 3615 rows and 1010Mb in table size
Re: pg_class has 3615 rows and 1010Mb in table size
List pgsql-general
The pgAdmin performance on one of our database servers has been dismal
for a while now. I captured one of the queries that was taking forever
to return, therefore making pgAdmin unresponsive for up to 10 minutes.

The query is as follows:
SELECT rel.oid, relname, rel.reltablespace AS spcoid, spcname,
pg_get_userbyid(relowner) AS relowner, relacl, relhasoids,
relhassubclass, reltuples, description, conname, conkey,
       EXISTS(select 1 FROM pg_trigger
                       JOIN pg_proc pt ON pt.oid=tgfoid AND
pt.proname='logtrigger'
                       JOIN pg_proc pc ON
pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
                     WHERE tgrelid=rel.oid) AS isrepl
, substring(array_to_string(rel.reloptions, ',') from
'fillfactor=([0-9]*)') AS fillfactor
  FROM pg_class rel
  LEFT OUTER JOIN pg_tablespace ta on ta.oid=rel.reltablespace
  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND
des.objsubid=0)
  LEFT OUTER JOIN pg_constraint c ON c.conrelid=rel.oid AND
c.contype='p'
 WHERE relkind IN ('r','s','t') AND relnamespace = 16686::oid
 ORDER BY relname

I looked at the pg_class table and noticed that its size is 1010Mb and
index size is 1137Mb, while the table itself has only 3615 rows in it.
I tried vacuuming it, but that did not change anything. Is there
anything I can do to get this table back to the size it is supposed to
be at?

PostgreSQL 8.2.6 on Windows 2003 Server.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: question about log entry from trigger execution
Next
From: pgsql
Date:
Subject: Re: Please help me debug regular segfaults on 8.3.10