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: Help with update query

Re: Help with update query

From: Scott Powell <powels10_at_nationwide.com>
Date: 23 Sep 2004 14:17:01 -0700
Message-ID: <94a6b39a.0409231317.4119c0f4@posting.google.com>


Hi,

I'm not very savy with Oracle, but here is the info. I do have the table and indexes analyzed, the explain plan looks like this:

UPDATE STATEMENT Optimizer=CHOOSE (Cost=220 Card=45657 Bytes=502227)   UPDATE OF CALENDAR
    TABLE ACCESS (FULL) OF CALENDAR (Cost=220 Card=45657 Bytes=502227)     SORT (AGGREGATE)
      TABLE ACCESS (FULL) OF CALENDAR (Cost=220 Card=45657 Bytes=365256)

This is a VERY large calendar table, has 90,000+ days in it. I think its dying trying to run the subquery multiple times, once for each of the 90,000 rows?

Note that right now, if I run this for a single year only (i.e. add a "where year = 1950" clause at end of update statement, the query takes just about a full minute to complete. If I run for 2 years, it is linearly taking 2 minutes. I have 250 years worth of time I need to do this for - and I can't spend 4 hours!!!

Thanks for your help!
Scott

rolympia_at_hotmail.com (Romeo Olympia) wrote in message news:<42fc55dc.0409222319.6038cbca_at_posting.google.com>...
> Hmmm, your first update approach (SQL 1) should have worked nicely.
> Tried simulating it using my own test table (in 9i) and this type of
> update with analytics shouldn't pose any problem.
>
> Your table stats accurate? Mind if we look at the execution plan?
>
> Cheers!
>
Received on Thu Sep 23 2004 - 16:17:01 CDT

Original text of this message

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