Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 445CFD2FB2E for ; Wed, 25 Apr 2012 23:40:36 -0300 (ADT) Received: from nm3-vm0.bullet.mail.ac4.yahoo.com ([98.139.53.204]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SNEdE-0005Ck-Pc for pgsql-performance@postgresql.org; Thu, 26 Apr 2012 02:40:35 +0000 Received: from [98.139.52.196] by nm3.bullet.mail.ac4.yahoo.com with NNFMP; 26 Apr 2012 02:40:19 -0000 Received: from [68.142.194.243] by tm9.bullet.mail.ac4.yahoo.com with NNFMP; 26 Apr 2012 02:40:19 -0000 Received: from [66.94.237.122] by t1.bullet.mud.yahoo.com with NNFMP; 26 Apr 2012 02:40:19 -0000 Received: from [127.0.0.1] by omp1027.access.mail.mud.yahoo.com with NNFMP; 26 Apr 2012 02:40:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 319560.57161.bm@omp1027.access.mail.mud.yahoo.com Received: (qmail 38164 invoked by uid 60001); 26 Apr 2012 02:40:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1335408018; bh=u2LRdeK/1XilO8xYy1p2GM/RSfuTq3d87PbQri1RiFs=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=xZ58XwxVffyhsUtNHoVQy87H3e7zfC8Lh9c+jVQ/yqzAIUHr8BqG+JogF5f8pnsgaK45B7/uPT3iVCIuj2TUb5Zo7ywWQEdv4r/G8cFi0Hif30aWG34ZIjTzuv2Z50mAxWtHKfNBQ5BjotK9NQngP4Rc7hDnOECjTjPHsAqNdFg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=F7YsedEzvZzwyZe+rTEQtRFvnzHQtR+XYX49Sj8GpB2WEbbY3CkXVcbmHyCqkUF/+FzVjFfVLL78qN7+S39zpS7vsCPFV5W3q/4TDgi3BBHRwD2CuUher/sKBkFzQx6A/6j0EOMA1XX1e3Q1L4hCin6TSeDIfxzouiyLNWT4zg0=; X-YMail-OSG: BdzmEPkVM1lNyx9Se5uq7M6sHBdG37ZndATop2UZ8agX30y rQOumSOifHyyg5_XfCnMZ1oFc4WcGIFBei4svEfrOCyEuVDoqxXhpzblQXgM tUvYZsVt10g4HJpBK0gkRh5MA9Pz9BEKpQGOXuUjg27KwtlURk5w7cA3D5bj bd51lEMqHP670ZMHsdMYdVKu7PkkBPx5Ssy3lFIo3UfF5G428HcNHqYHXdBH fc8YzX4igiqI7yFxUto_MNGuWz9hxjdGRdOeRootXYnqgaiYJL6LU6Z3_WM3 YhGumyHeAjPLHHA5DR6xP5dfXAs48GBh.CfIoZCL4_BKkoSj.2ou8KfVR1tk dQuwGhCfML5ceBMR0iseIuSk30vGhVArd_XYQ_qO0di3Sr00MF1_fbTQWhsG khzFovAXHbMIK0DNrN3tGWfT4YlH_fb6ryq7E0HYktBU5GiyMs42pFvBdLVS TnJtqrj2jvF1Ok9FmEELZwbX42dsmUFMU5vk- Received: from [24.6.62.191] by web184514.mail.ne1.yahoo.com via HTTP; Wed, 25 Apr 2012 19:40:18 PDT X-Mailer: YahooMailWebService/0.8.117.340979 References: <1335379923.47084.YahooMailNeo@web184514.mail.ne1.yahoo.com> <1335388323.84458.YahooMailNeo@web184517.mail.ne1.yahoo.com> <1335390338.10325.YahooMailNeo@web184505.mail.ne1.yahoo.com> <5452.1335390728@sss.pgh.pa.us> Message-ID: <1335408018.29771.YahooMailNeo@web184514.mail.ne1.yahoo.com> Date: Wed, 25 Apr 2012 19:40:18 -0700 (PDT) From: Venki Ramachandran Reply-To: Venki Ramachandran Subject: Re: Parallel Scaling of a pgplsql problem To: Tom Lane Cc: Pavel Stehule , Samuel Gendler , "pgsql-performance@postgresql.org" In-Reply-To: <5452.1335390728@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-986170028-41697717-1335408018=:29771" X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201204/154 X-Sequence-Number: 46800 ---986170028-41697717-1335408018=:29771 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Tom, clock_timestamp() worked. Appreciate it!!! and Sorry was hurryi= ng to get this done at work and hence did not read through.=0A=0ACan you co= mment on how you would solve the original problem? Even if I can get =A0the= 11 seconds down to 500 ms for one pair, running it for 300k pairs will tak= e multiple hours. How can one write a combination of a bash script/pgplsql = code so as to use all 8 cores of a server. I am seeing that this is just ex= ecuting in one session/process.=0A=0Athanks and regards, Venki=0A=0A=0A____= ____________________________=0A From: Tom Lane =0ATo: Ve= nki Ramachandran =0ACc: Pavel Stehule ; Samuel Gendler ; "pgsql-per= formance@postgresql.org" =0ASent: Wednes= day, April 25, 2012 2:52 PM=0ASubject: Re: [PERFORM] Parallel Scaling of a = pgplsql problem =0A =0AVenki Ramachandran wr= ites:=0A> Replacing current_timestamp() with=A0transaction_timestamp() and= =A0statement_timestamp() did not help!!!.=A0=0A=0AYou did not read the docu= mentation you were pointed to.=A0 Use=0Aclock_timestamp().=0A=0A=A0=A0=A0 = =A0=A0=A0 =A0=A0=A0 regards, tom lane ---986170028-41697717-1335408018=:29771 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Tom, clock_t= imestamp() worked. Appreciate it!!! and Sorry was hurrying to get this done= at work and hence did not read through.

=
Can you comment on how you would solve the original proble= m? Even if I can get  the 11 seconds down to 500 ms for one pair, runn= ing it for 300k pairs will take multiple hours. How can one write a combina= tion of a bash script/pgplsql code so as to use all 8 cores of a server. I = am seeing that this is just executing in one session/process.
<= div>
thanks and regards, Venki


From= : Tom Lane <tgl@sss.pgh.pa.us>
To: Venki Ramachandran <venki_ramachandran@yah= oo.com>
Cc: Pavel S= tehule <pavel.stehule@gmail.com>; Samuel Gendler <sgendler@ideascu= lptor.com>; "pgsql-performance@postgresql.org" <pgsql-performance@pos= tgresql.org>
Sent:= Wednesday, April 25, 2012 2:52 PM
venki= _ramachandran@yahoo.com> writes:
> Replacing current_timestamp= () with transaction_timestamp() and statement_timestamp() did not= help!!!. 

You did not read the documentation you were pointed = to.  Use
clock_timestamp().

      &= nbsp;     regards, tom lane


---986170028-41697717-1335408018=:29771--