Re: Memory usage during vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shelby Cain <alyandon(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Memory usage during vacuum
Date: 2004-03-25 18:38:18
Message-ID: 13252.1080239898@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Shelby Cain <alyandon(at)yahoo(dot)com> writes:
> It still decided to sample 150000 rows. Am I missing
> something obvious here? Shouldn't fewer rows be
> sampled when I set the collection target to 1?

The sample size is 300 rows times the largest per-column analysis
target, where default_statistics_target is used if the recorded
per-column setting is -1. I would say that you have set a target of 500
for at least one of the columns of that table, using ALTER TABLE SET
STATISTICS. Try this to see which:

select attname, attstattarget from pg_attribute
where attrelid = 'table_name_here'::regclass;

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2004-03-25 18:45:15 Re: Perl DBIx::SearchBuilder and pg_atoi: zero-length string?
Previous Message Jan Wieck 2004-03-25 18:37:01 Re: 7.4.2 on Solaris 9 - Error