Thread

  1. Answering my own question

    gerry.smit@lombard.ca — 2002-05-15T17:37:56Z

    I found, on http://www.argudo.org/postgresql/soft-tuning-10.html  my
    answer. (Excellent site btw)  What I need to do is prefix my SELECT
    statements for this table with the statement :
    
    SET enable_seqscan='false';
    
    as in :
    
    SET enable_seqscan='false';SELECT * FROM pol_xref_d WHERE policy_no=1200079
    ORDER BY sequence;
    
    
    This change makes the response sub-second , a great improvement over the
    11+ seconds we're currently experiencing.
    
    I'ld love any explanation of why the Query plan was going sequential versus
    indexed.
    
    Gerry
    
    
    
    
    
    
  2. Re: Answering my own question

    Manuel Sugawara <masm@fciencias.unam.mx> — 2002-05-15T17:45:05Z

    gerry.smit@lombard.ca writes:
    
    > I'ld love any explanation of why the Query plan was going sequential
    > versus indexed.
    
    Sorry I miss the original thread, but the question is: Did you vacuum
    analyze'd your data?
    
    Regards,
    Manuel.
    
    
  3. Re: Answering my own question

    ghaverla@freenet.edmonton.ab.ca — 2002-05-15T17:50:24Z

    On Wed, 15 May 2002 gerry.smit@lombard.ca wrote:
    
    > I found, on http://www.argudo.org/postgresql/soft-tuning-10.html  my
    > answer. (Excellent site btw)  What I need to do is prefix my SELECT
    > statements for this table with the statement :
    > 
    > SET enable_seqscan='false';
    > 
    > as in :
    > 
    > SET enable_seqscan='false';SELECT * FROM pol_xref_d WHERE policy_no=1200079
    > ORDER BY sequence;
    
    Some else mentioned ANALYZE (or is it ANALYSE?).  Anyway,
    I seem to remember reading someplace that with newer versions
    of PostgreSQL, when you used to VACUUM on a regular basis,
    you were supposed to change over to VACUUM ANALYSE (ANALYZE?)
    some (all?) of the time.  My memory is fuzzy about this,
    so perhaps the docs will have something on this.
    
    Gord
    
    Matter Realisations     http://www.materialisations.com/
    Gordon Haverland, B.Sc. M.Eng. President
    101  9504 182 St. NW    Edmonton, AB, CA  T5T 3A7
    780/481-8019            ghaverla @ freenet.edmonton.ab.ca
    780/993-1274 (cell)