Re: update slows down in pl/pgsql function

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Jenny Zhang <jenny(at)osdl(dot)org>
Cc: perf-pgsql <pgsql-performance(at)postgresql(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: update slows down in pl/pgsql function
Date: 2003-12-16 23:54:34
Message-ID: 20031216155342.J28271@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Tue, 16 Dec 2003, Jenny Zhang wrote:

> I have stored procedure written in pl/pgsql which takes about 13 seconds
> to finish. I was able to identify that the slowness is caused by one
> update SQL:
>
> UPDATE shopping_cart SET sc_sub_total=sc_subtotal, sc_date=now()
> WHERE sc_id=sc_id;

Umm, is that exactly the condition you're using? Isn't that going to
update the entire table?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jenny Zhang 2003-12-17 00:07:26 Re: update slows down in pl/pgsql function
Previous Message Jenny Zhang 2003-12-16 23:52:41 update slows down in pl/pgsql function

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Poole 2003-12-16 23:55:41 Re: Nested loop performance
Previous Message Jenny Zhang 2003-12-16 23:52:41 update slows down in pl/pgsql function