| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | gry(at)ll(dot)mit(dot)edu |
| Cc: | "Henrik Steffen" <steffen(at)city-map(dot)de>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: vacuum full |
| Date: | 2002-11-21 19:21:24 |
| Message-ID: | 13677.1037906484@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
george young <gry(at)ll(dot)mit(dot)edu> writes:
> Does someone know the right way to map from database name to
> data directory name?
pg_database.oid column.
However, that's definitely the hard way. I'd just look at the relpages
column of pg_class, which should be reasonably accurate if you've done
a VACUUM or ANALYZE recently. For example:
regression=# select relname, relkind, relpages from pg_class where
regression-# relname like 'tenk1%';
relname | relkind | relpages
---------------+---------+----------
tenk1 | r | 358
tenk1_hundred | i | 30
tenk1_unique1 | i | 30
tenk1_unique2 | i | 30
(4 rows)
Here we have a table and its three indexes, and the index sizes look
reasonable. If the index sizes approach or exceed the table size,
you are probably suffering from index bloat --- try a reindex.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | typea | 2002-11-21 19:21:26 | Re: Query Analysis |
| Previous Message | scott.marlowe | 2002-11-21 19:12:35 | Re: vacuum full |