Re: pgbench -i order of vacuum

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Jeff Janes'" <jeff(dot)janes(at)gmail(dot)com>, "'pgsql-hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench -i order of vacuum
Date: 2012-07-20 14:57:21
Message-ID: 000d01cd6687$f766f3f0$e634dbd0$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> From: pgsql-hackers-owner(at)postgresql(dot)org
[mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Jeff Janes
> Sent: Friday, July 20, 2012 5:36 AM

> Is there a reason to vacuum the pgbench_* tables after the indexes on them
are built, rather than before?

> Since the indexes are on fresh tables, they can't have anything that needs
to be cleaned.

The command it executes is "vacuum analyze ..", so it will do analyze also
on table which means
it will collect stats corresponding to table and index. So if you do it
before creation of index pgbench might behave
different.
In specific, from function do_analyze_rel(), it will not call
compute_index_stats() if you execute the command before
Creation of index.

With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2012-07-20 15:37:08 Re: pgbench -i order of vacuum
Previous Message Merlin Moncure 2012-07-20 14:21:32 Re: row literal problem