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 SQL_Statement

Re: Slow SQL_Statement

From: William Robertson <william.robertson_at_bigfoot.com>
Date: 12 Dec 2005 16:12:37 -0800
Message-ID: <1134432757.134316.108050@z14g2000cwz.googlegroups.com>


Thomas wrote:
> Hi,
>
> I have a great performance problem on an Oracle 9.2.0.1 Server...
> (This Problem is independent from the version)
> I try to update a table containing about 800,000 Rows with the
> following statement:
>
> UPDATE ACCT_RELATION SET GETSCORE=1
> WHERE mandant||kndid||ktoid IN (
> SELECT mandant||kndid||ktoid
> FROM ACCOUNT) ;
>
> Only Four rows but about two days of processing time. This is not the
> only statetement used, so the complete job would sum to about 10 days
> of processing time. This is much, much too long.
> Has anyone an Idea how to speed up the processing by changing the
> statement?
>
> more information:
> both tables ACCT_RELATION and ACCOUNT have about 800000 rows.
> no index
> no primary defined
> mandant,kndid,ktoid is a unique tuple.
> Would an index help or does oracle make a tablescan even if the index
> exists?

Also perhaps worth mentioning is that this type of approach ("where col1||col2||col3 = something") may not always give the correct results, because 12 || 345 || 6 is the same as 1 || 23 || 456. Received on Mon Dec 12 2005 - 18:12:37 CST

Original text of this message

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