Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Slow update query

Re: Slow update query

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Tue, 16 Mar 2004 15:24:23 -0000
Message-ID: <40571c27$0$6545$ed9e5944@reading.news.pipex.net>


I have two immediate comments and a question

  1. do you have appropriate indexes on the key columns?
  2. if you have any records that don't match your where clause you are going to be updating a number of columns in CELLCFG.NEIGHBOUR_LIST to NULL, I suspect you don't want this.

Can you post the explain plan?

-- 
Niall Litchfield
Oracle DBA
Audit Commission UK
"Tayfun Yetkin" <yetkin_at_bornova.ege.edu.tr> wrote in message
news:e82b22f6.0403160445.5bc23204_at_posting.google.com...

> I want to update table by using another table columns. I wrote the
> update query like as below. But it takes an hour and not finished. All
> table structure is similar and similar size (220000 records for each).
> How can optimize the query or is there any other solution for making
> this update
>
> UPDATE CELLCFG.NEIGHBOUR_LIST N1
> SET
> (CAND, CS, KHYST, KOFFSETP, LHYST, LOFFSETP,
> TRHYST, TROFFSETP, AWOFFSET, BQOFFSET)=
> (SELECT N2.CAND, N2.CS, N2.KHYST, N2.KOFFSET, N2.LHYST, N2.LOFFSET,
> N2.TRHYST, N2.TROFFSET, N2.AWOFFSET, N2.BQOFFSET
> FROM CELLTRANSFORM.NEIGHBOUR_LIST
> WHERE N1.MAIN_CELL_KEY=N2.MAINKEY
> AND N1.NEIGHBOUR_CELL_KEY=N2.NBRKEY);
>
> BR
>
> Tayfun
Received on Tue Mar 16 2004 - 09:24:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US