From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | hewei <heweiweihe(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to make update rapidly? |
Date: | 2008-02-20 07:07:21 |
Message-ID: | dcc563d10802192307x7a7821e7s39eab799218636bd@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Feb 19, 2008 9:38 PM, hewei <heweiweihe(at)gmail(dot)com> wrote:
> Hi,Every body;
> I have a table contains 100,000 rows, and has a primary key(int).
> Now ,I need to execute sql command like "update .......... where id=*"(id
> is primary key).
> I expect execute 1200-1600 sqlcommands per second(1200-1600/s).
> In test,when the id increase by degrees in sqlcommands, then I can reach
> the speed(1600/s);
> But in fact , the id in sqlcommands is out of rule, then the speed is
> very slow, just 100/s.
Assuming that you're updating a non-indexed field, you should really
look at migrating to 8.3 if you haven't already. It's performance on
such issues is reportedly much faster than 8.2.
As for processing them in order versus randomly, that's a common
problem. right sizing shared_buffers so that all of the table can fit
in ram might help too. As would a caching RAID controller.
From | Date | Subject | |
---|---|---|---|
Next Message | Dragan Zubac | 2008-02-20 07:26:43 | Re: ERROR: relation with OID 1322527 does not exist |
Previous Message | Scott Marlowe | 2008-02-20 07:04:04 | Re: temp table in 8.3 |