Re: [SQL] Questions about vacuum analyze - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: [SQL] Questions about vacuum analyze
Date
Msg-id 199910012014.QAA04993@candle.pha.pa.us
Whole thread Raw
In response to Re: [SQL] Questions about vacuum analyze  ("Steven M. Wheeler" <swheeler@sabre.com>)
List pgsql-sql
> System: Compaq ProLiant 3000 with 2 300MHz PentPro, 512MB RAM, 32GB hardware
> based stripe-set for the DB area.
> OS: Linux kernel 2.2.12
> DB: version 6.5
> 
> Thanks for the info, thought I'd send a followup regarding my ongoing
> problems with vacuum.
> 
> After the last email, I vacuumed the DB a couple of times, with indexes
> dropped.  The first time it completed in 2-3 hours, the next time was
> appreciably longer.  After this I stopped doing anything except for inserts,
> trying to catch up on the incoming data.  This went on for a little over a
> week until I had inserted several million additional rows (its now up to
> 31M+).  I then dropped the indexes and started vacuum again.
> Start: 09/28/1999@10:06:57
> Finish: 09/30/1999@19:13:14
> 
> 33 hours - WOW!

Yikes, that is a long time.

> 
> This morning, I rebuilt the indexes and tried to do a "select distinct
> statdate from currnt;"  This select statement has been running for several

SELECT DISTINCT    is going to take forever because it has to read all
rows, then sort them to remove the duplicates.  That could take some
time.  DISTINCT doesn't use the indexes, because if it did, it would be
paging in all over the place.  Better to read the table sequentially,
then sort.



--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: "Steven M. Wheeler"
Date:
Subject: Re: [SQL] Questions about vacuum analyze
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Questions about vacuum analyze