slow update

From: Patrick Hatcher <PHatcher(at)macys(dot)com>
To: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: slow update
Date: 2005-10-13 16:34:39
Message-ID: OFA8DB89A3.5A1EFBC0-ON88257099.005948E9-88257099.005B0CF7@FDS.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Pg 7.4.5
RH 7.3
Quad Xeon 3Gz
12G ram

Trying to do a update of fields on 23M row database.
Is it normal for this process to take 16hrs and still clocking? Both join
fields are indexed and I have removed any indexes on the updated columns.
Also both tables are vacuumed regularly.
I'm weary to cancel the job for fear that it is just slow and I'll have to
repeat the 16hr job.
Any suggestions of what I can check for the bottleneck?

Below is my update statement and table structure:

update cdm.cdm_ddw_tran_item
set dept_id = dept,
vend_id = vend,
mkstyl = mstyle
from flbasics
where flbasics.upc = cdm.cdm_ddw_tran_item.item_upc;

CREATE TABLE cdm.cdm_ddw_tran_item
(
appl_xref varchar(22),
intr_xref varchar(13),
tran_typ_id char(1),
tran_ship_amt numeric(8,2),
fill_store_div int4,
soldto_cust_id int8,
soldto_cust_seq int4,
shipto_cust_id int8,
shipto_cust_seq int4,
itm_qty int4,
itm_price numeric(8,2),
item_id int8,
item_upc int8,
item_pid varchar(20),
item_desc varchar(30),
nrf_color_name varchar(10),
nrf_size_name varchar(10),
dept_id int4,
vend_id int4,
mkstyl int4,
ddw_tran_key bigserial NOT NULL,
price_type_id int2 DEFAULT 999,
last_update date DEFAULT ('now'::text)::date,
CONSTRAINT ddw_tritm_pk PRIMARY KEY (ddw_tran_key)
)
WITHOUT OIDS;

CREATE TABLE flbasics
(
upc int8,
dept int4,
vend int4,
mstyle int4,
xcolor int4,
size int4,
owned float8,
cost float8,
xclass int2,
firstticket float8,
status char(2),
last_receipt date,
description varchar(50),
pack_qty int2,
discontinue_date date,
std_rcv_units int4,
std_rcv_cost float8,
std_rcv_retail float8,
first_receipt date,
last_pchange varchar(9),
ticket float8,
std_mkd_units int4,
std_mkd_dollars float8
)
WITHOUT OIDS;

Patrick Hatcher
Development Manager Analytics/MIO
Macys.com

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-10-13 18:34:05 Re: slow update
Previous Message Andrew Sullivan 2005-10-13 16:07:14 Re: Help tuning postgres