From: | Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no> |
---|---|
To: | sam <sam(dot)mahindrakar(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Performance of update |
Date: | 2008-03-27 09:09:52 |
Message-ID: | 47EB6460.1040306@usit.uio.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
sam wrote:
> Hi
> Iam trying to update a database table with approx 45000 rows. Iam not
> updating all rows at a time. Iam updating 60 rows at a given time for
> example. and this is happening in a FOR LOOP. A function that has the
> update statements is called within the loop.
>
> The updates take too long.....is postgres slow in doing updates on
> large tables or is it because of the function call within the loop???
45000 rows isn't a large table, and there's no reason why it should be
slow in updating 60 rows.
Did you VACUUM ANALYZE; your table recently? Are the columns you use in
your WHERE indexed?
What does EXPLAIN ANALYZE say?
--
Tommy Gildseth
From | Date | Subject | |
---|---|---|---|
Next Message | Alain Roger | 2008-03-27 09:30:33 | returned value from SQL statement |
Previous Message | pgsql-general-owner | 2008-03-27 08:56:10 | [pgsql-general] Daily digest v1.8030 (22 messages) |