DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Slow update

Hybrid View

  1. #1
    Join Date
    Jan 2000
    Posts
    387

    Unhappy Slow update

    Hi

    I have a table with only 15,000 records and i need to update all the records to increment by 1 every min, therefore a full scan on the table is neccessary. However, the update is very slow!!

    I did a timing and it can takes up to 2 mins to update all the records! Is there any ways which I can improve the perofrmance of the updates??
    Thank you!

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Sounds like bad design! If the value of a proposed column is incremented by 1 every minute, then one solution is for it NOT to be stored but calculated from sysdate and some start time (which IS stored in the row).

  3. #3
    Join Date
    Jan 2000
    Posts
    387
    Thanks... how do i get the time for the previous 30 mins?

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    ? ? ? ?

    If you store sysdate in (say) DateCreated when the row is inserted, then
    trunc((sysdate - DateCreated)*24*60)
    says how many minutes it has existed.

    If that's not what you want, you need to explain your business requirements better.

  5. #5
    Join Date
    Feb 2003
    Location
    INDIA
    Posts
    96
    Mooks, can you check your wait events for which the query execution is waiting on.

    select sid, event, total_waits,average_wait, time_waited/100 Time_Waited_in_seconds, max_wait
    from v$session_event
    where sid = &sid;

    Cheers
    Dilip Patel
    OCP 8i

    Catch me online at Yahoo: ddpatel256

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width