Re: Improving pgbench to log index creation time etc.

Lists: pgsql-hackers
From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Improving pgbench to log index creation time etc.
Date: 2013-02-11 03:40:31
Message-ID: 20130211.124031.1161065291829523889.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi PostgreSQL hackers,

I often need to calculate time to spend for index creation and vacuum
to analyze PostgreSQL data load performance. Index creation and vacuum
will take non trivial time for large scale data and it is important
information of data loading benchmark.

So I would like to propose to add new options to be used with pgbenh
-i (initialize) mode:

--log-index-creation-duration: log duration of index creation in seconds
--log-vacuum-duration: log duration of vacuum in seconds

What do you think?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improving pgbench to log index creation time etc.
Date: 2013-02-11 10:26:43
Message-ID: 20130211102643.GA7148@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2013-02-11 12:40:31 +0900, Tatsuo Ishii wrote:
> So I would like to propose to add new options to be used with pgbenh
> -i (initialize) mode:
>
> --log-index-creation-duration: log duration of index creation in seconds
> --log-vacuum-duration: log duration of vacuum in seconds
>
> What do you think?

I propose doing this unconditionally. Adding an option seems too
complicated.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improving pgbench to log index creation time etc.
Date: 2013-02-11 14:32:02
Message-ID: 18886.1360593122@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> Hi PostgreSQL hackers,
> I often need to calculate time to spend for index creation and vacuum
> to analyze PostgreSQL data load performance. Index creation and vacuum
> will take non trivial time for large scale data and it is important
> information of data loading benchmark.

> So I would like to propose to add new options to be used with pgbenh
> -i (initialize) mode:

> --log-index-creation-duration: log duration of index creation in seconds
> --log-vacuum-duration: log duration of vacuum in seconds

> What do you think?

I would think if you wanted that, you could set up a custom script that
does CREATE INDEX and/or VACUUM. The built-in scenario isn't all that
interesting...

regards, tom lane