Re: Answering my own question - Mailing list pgsql-novice

From gerry.smit@lombard.ca
Subject Re: Answering my own question
Date
Msg-id OFC4ADB236.87C069B0-ON85256BBB.004FC3FD@lombard.ca
Whole thread Raw
In response to Answering my own question  (gerry.smit@lombard.ca)
List pgsql-novice
Well, the VACUUM ANALYZE took 4 hours last night, but it seems to have
fixed the problem. EXPLAIN SELECT .... and SELECT from both tables is now
using the indicies and gets sub-second response, even with 800,000 rows of
data.

Now to see whether or not I make VACUUM ANALYZE  a nightly thing, or
weekly. 4 hours is long, but its been a LONG time since the last one (like
never).

btw I was confusing VERBOSE with ANALYZE.(Well, this IS the NOVICE list,
right?)  VERBOSE definitely makes the cron_log output too long to read.
ANALYZE produces nothing in the cron log, unless VERBOSE Is given as well.

Thanks for all the help so far folks, it's been bang on.

Gerry




        
                      Chris
        
                      <csmith@squiz.ne         To:      gerry.smit@lombard.ca
        
                      t>                       cc:      pgsql-novice@postgresql.org
        
                                               Fax to:
        
                      15/05/2002 07:28         Subject: Re: [NOVICE] Answering my own question
        
                      PM
        

        

        





>Now THAT's REALLY fascinating.  We upgraded from 6.5 to 7.1 about 4-5
>months ago , and only got this problem after that. I leave "ANALYZE" out
of
>VACUUM due to the large volume of (I though needless) output that gets
>piped to my cron_log.
>
>Does anyone have a feal for how "necessary" VACUUM ANALYZE is over
"VACUUM"
>??

As you noticed, pretty necessary :)

A vacuum analyze updates the statistics used when the planner decides on
what action to take (whether it's a sequential scan, using an index etc).

A plain vacuum removes dead tuples from the system, not much else.


-----------------
      Chris Smith
http://www.squiz.net/








pgsql-novice by date:

Previous
From: John Taylor
Date:
Subject: Re: Catching errors inside transactions
Next
From: Tom Ansley
Date:
Subject: Casting from varchar to numeric