pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <eetasoft@online.ee>
To: pgsql-performance@postgresql.org
Subject: Re: Query runs 38 seconds for small database!
Date: Mon, 8 May 2006 19:15:36 +0300
Message-ID: <e3nqv9$30v0$1@news.hub.org> (raw)
References: <e3n8at$1f7i$1@news.hub.org>
	<26838.1147099614@sss.pgh.pa.us>

>> "                    ->  Seq Scan on konto dbkonto  (cost=0.00..23.30 
>> rows=1
>> width=44) (actual time=0.017..1.390 rows=219 loops=1)"
>> "                          Filter: (iseloom = 'A'::bpchar)"
>
> Anytime you see a row estimate that far off about a simple single-column
> condition, it means your statistics are out-of-date.

Than you. I addded ANALYZE command and now  query works fast.

I see autovacuum: processing database "mydb" messages in log file and I have

stats_start_collector = on
stats_row_level = on

in config file. Why statistics was out-of-date ?

Andrus.


My postgres.conf file (only uncommented settings are listed):

listen_addresses = '*'
max_connections = 40
shared_buffers = 1000
log_destination = 'stderr'
redirect_stderr = on   # Enable capturing of stderr into log
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
log_rotation_age = 1440  # Automatic rotation of logfiles will
log_rotation_size = 10240  # Automatic rotation of logfiles will
log_min_error_statement = 'warning' # Values in order of increasing 
severity:
silent_mode = on
log_line_prefix = "'%t %u %d %h %p %i %l %x %q'"
stats_start_collector = on
stats_row_level = on
autovacuum = on   # enable autovacuum subprocess?
lc_messages = 'C'   # locale for system error message
lc_monetary = 'C'   # locale for monetary formatting
lc_numeric = 'C'   # locale for number formatting
lc_time = 'C'    # locale for time formatting





view thread (12+ messages)  latest in thread

Message-ID: <e3nqv9$30v0$1@news.hub.org>
Permalink:  ../e3nqv9$30v0$1@news.hub.org/
Also on:    postgresql.org/message-id/e3nqv9$30v0$1@news.hub.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: eetasoft@online.ee
  Subject: Re: Query runs 38 seconds for small database!
  In-Reply-To: <e3nqv9$30v0$1@news.hub.org>

* 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