From: | Jenny Zhang <jenny(at)osdl(dot)org> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | perf-pgsql <pgsql-performance(at)postgresql(dot)org>, general-pgsql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: update slows down in pl/pgsql function |
Date: | 2003-12-17 00:07:26 |
Message-ID: | 1071619646.10925.19.camel@ibm-a.pdx.osdl.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-performance |
Oops, I named the var name the same as the column name. Changing it to
something else solved the problem.
Thanks,
Jenny
On Tue, 2003-12-16 at 15:54, Stephan Szabo wrote:
> 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?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
From | Date | Subject | |
---|---|---|---|
Next Message | Dev | 2003-12-17 00:11:33 | Join Issues |
Previous Message | Stephan Szabo | 2003-12-16 23:54:34 | Re: update slows down in pl/pgsql function |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-12-17 01:17:26 | Re: Nested loop performance |
Previous Message | Richard Poole | 2003-12-16 23:55:41 | Re: Nested loop performance |