From: | "Andrus" <eetasoft(at)online(dot)ee> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Query runs 38 seconds for small database! |
Date: | 2006-05-08 16:15:36 |
Message-ID: | e3nqv9$30v0$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
>> " -> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-08 16:27:06 | Re: Query runs 38 seconds for small database! |
Previous Message | Vivek Khera | 2006-05-08 15:06:42 | Re: Memory and/or cache issues? |