Marie,
> I pg_dumped the first database having performance problems and reloaded it
> into a new database on the same server. The query ran normally when I
> reloaded it. There is no difference in hardware, schema or anything else.
That's a pretty brutal query.
From the comparison between the two queries, it looks like you have a lot of
discarded rows cluttering up the original database, just like I did.
What happens if you run VACUUM FULL VERBOSE on the Bad database? Does it
report lots of rows taken up?
--
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco