| From: | Alfred Perlstein <bright(at)wintelcom(dot)net> |
|---|---|
| To: | "Grembowicz, Kenneth" <GrembowiczK(at)NAVO(dot)NAVY(dot)MIL> |
| Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: VERY SLOW UPDATES |
| Date: | 2000-08-18 16:17:15 |
| Message-ID: | 20000818091714.P4854@fw.wintelcom.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
* Grembowicz, Kenneth <GrembowiczK(at)NAVO(dot)NAVY(dot)MIL> [000818 09:08] wrote:
> This is my situation...
> My table has about 1.6 million records.
> I am trying to use the update command to insert new data.
> However, it is extremely slow--about 2 to 4 seconds per update.
> You can see my problem is I am trying to update 40,000 records.
> Any insight or suggestion would be appreciated.
> -Ken
>
> PS I am currently wrapping my updates in a transaction block and indexes
> have been dropped.
I think that dropping indexes might be a bad idea particularly
since the update must search for the row to be updated and probably
is forced to do a sequential scan. I would put the index on the
row of your UPDATE's where clause.
-Alfred
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Mercer | 2000-08-18 16:30:12 | vacuum/re-index vs. vacuum with indexes |
| Previous Message | David Shrewsbury | 2000-08-18 15:47:19 | vacuum messages |