Re: "explain analyze" a procedure verbosely - to find which statement in it takes longer

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: "explain analyze" a procedure verbosely - to find which statement in it takes longer
Date: 2013-02-06 10:39:47
Message-ID: CAF-3MvOGU5VjK2Sd1Amu_FvL+a8jmnTRFwXC=fP=UJx-w-0=Zw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6 February 2013 11:03, Alexander Farber <alexander(dot)farber(at)gmail(dot)com>wrote:

> begin
>
> insert into pref_ban2 select
> id,
> first_name,
> last_name,
> city,
> last_ip
> from pref_users where id=_id;
>
> update pref_ban2 set reason=_reason where id=_id;
>

It's not the answer to your query, but why don't you do the above in a
single statement?

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2013-02-06 10:55:16 Re: function for setting/getting same timestamp during whole transaction
Previous Message Miroslav Šimulčík 2013-02-06 10:39:03 Re: function for setting/getting same timestamp during whole transaction