From: Josh Berkus <josh@agliodbs.com>
To: Paul McKay <paul_mckay@clearwater-it.co.uk>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow query performance on large table
Date: Tue, 4 Mar 2003 09:14:44 -0800
Message-ID: <200303040914.44390.josh@agliodbs.com> (raw)
In-Reply-To: <000001c2e268$b1e47210$0c64a8c0@paulspc>
References: <000001c2e268$b1e47210$0c64a8c0@paulspc>
Paul,
> Index Scan using idx_measurement_assessment on measurement
> (cost=0.00..34668.61 rows=261 width=8) (actual time=26128.07..220584.69
> rows=503 loops=1)
> Total runtime: 220587.06 msec
These query results say to me that you need to do both a VACUUM FULL and a
REINDEX on this table. The 26-second delay before returning the first row
says "table/index with lots of dead pages" to me.
For the future, you should consider dramatically increasing your FSM settings
and working a regular VACUUM FULL and REINDEX into your maintainence jobs.
--
Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, paul_mckay@clearwater-it.co.uk, tgl@sss.pgh.pa.us
Subject: Re: Slow query performance on large table
In-Reply-To: <200303040914.44390.josh@agliodbs.com>
References: <000001c2e268$b1e47210$0c64a8c0@paulspc> <200303040914.44390.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox