slow update - Mailing list pgsql-performance

From kevin kempter
Subject slow update
Date
Msg-id 468CEDC5-0707-4C5F-880F-45A75330731A@kevinkempterllc.com
Whole thread Raw
Responses Re: slow update
Re: slow update
List pgsql-performance
Hi all;

I have a query that does this:

update tab_x set (inactive_dt, last_update_dt) =
((select run_dt from current_run_date), (select run_dt from
current_run_date))
where
cust_id::text || loc_id::text in
(select cust_id::text || loc_id::text from summary_tab);


The current_run_date table has only 1 row in it
the summary_tab table has 0 rows and the tab_x had 450,000 rows

The update takes 45min even though there is no rows to update.
I have a compound index (cust_id, loc_id) on both tables (summary_tab
and tab_x)

How can I speed this up ?


Thanks in advance for any thoughts, suggestions, etc...


/Kevin

pgsql-performance by date:

Previous
From: PFC
Date:
Subject: Re: I/O on select count(*)
Next
From: "A. Kretschmer"
Date:
Subject: Re: slow update