Re: Strange slow database

From: David Mitchell <david(dot)mitchell(at)telogis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange slow database
Date: 2005-11-18 02:40:11
Message-ID: 437D3F0B.9040601@telogis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Tom Lane wrote:
> Have you checked to see whether you are encountering table or index
> bloat? Your vacuuming policy doesn't sound unreasonable on its face,
> but there's no substitute for actually looking at physical file sizes
> when you aren't sure what's wrong. Try doing a pg_dump and reload into
> a virgin database, then compare file sizes with the original
> table-by-table to see if anything is drastically out of line.
> Don't forget to look at the system catalogs too.

I dumped and loaded then wrote a script to compare the sizes of tables.
I noticed that a few of the indexes, especially the indexes on the
15million table shrunk a lot (~50% reduction - ~400Mb). Also, the
pg_attribute_relid_attnam_index index shrank loads, to 1% of its
original size. From this, we tried reindexing indexes and found we got
the same reduction in index size. Strangely though, our queries appear
to have sped up not just on the servers we reindexed, but across the
whole cluster - so apparently something else is affecting the speed of
this all, not just bloat. We're scratching our heads, this is nothing if
not a little frustrating.

--
David Mitchell
Software Engineer
Telogis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-11-18 02:49:16 Re: Strange slow database
Previous Message Marc G. Fournier 2005-11-18 02:17:53 Re: Sun supporting PostgreSQL