Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2E0CCB5D91F for ; Thu, 16 Jun 2011 15:26:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 38911-06 for ; Thu, 16 Jun 2011 18:26:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og106.obsmtp.com (exprod7og106.obsmtp.com [64.18.2.165]) by mail.postgresql.org (Postfix) with ESMTP id 3307DB5D8BD for ; Thu, 16 Jun 2011 15:26:51 -0300 (ADT) Received: from mail-ey0-f174.google.com ([209.85.215.174]) (using TLSv1) by exprod7ob106.postini.com ([64.18.6.12]) with SMTP ID DSNKTfpK6u/359AToAl8TvmxP5vn0r7Yszss@postini.com; Thu, 16 Jun 2011 11:26:51 PDT Received: by eyx24 with SMTP id 24so657062eyx.19 for ; Thu, 16 Jun 2011 11:26:49 -0700 (PDT) Received: by 10.213.16.199 with SMTP id p7mr515638eba.99.1308248808654; Thu, 16 Jun 2011 11:26:48 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id b1sm1564091eeg.19.2011.06.16.11.26.46 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2011 11:26:47 -0700 (PDT) Message-ID: <4DFA4AE5.1010806@enterprisedb.com> Date: Thu, 16 Jun 2011 21:26:45 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.17) Gecko/20110510 Icedove/3.1.10 MIME-Version: 1.0 To: Alexander Korotkov CC: pgsql-hackers Subject: Re: WIP: Fast GiST index build References: <4DEC84D7.7040602@enterprisedb.com> <4DECB141.2040707@enterprisedb.com> <4DF8676F.9040801@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/1435 X-Sequence-Number: 190148 On 16.06.2011 21:13, Alexander Korotkov wrote: > My current idea is to measure number of IO accesses by pg_stat_statements > and measure CPU usage by /proc/PID/stat. Any thoughts? Actually, you get both of those very easily with: set log_statement_stats=on LOG: QUERY STATISTICS DETAIL: ! system usage stats: ! 0.000990 elapsed 0.000000 user 0.000000 system sec ! [0.000000 user 0.008000 sys total] ! 0/0 [32/0] filesystem blocks in/out ! 0/0 [0/959] page faults/reclaims, 0 [0] swaps ! 0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent ! 0/0 [10/1] voluntary/involuntary context switches STATEMENT: SELECT generate_series(1,100); -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com