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

Thread: urgent reply please

  1. #1
    Join Date
    Feb 2008
    Posts
    2

    urgent reply please

    hi

    while iam trying to update one column from other table is taking too much of time. following is the command iam using

    structru of table1

    acno,col1,col2,col3,col4,col5

    and table1 has approx 4 lakhs records.

    stru of table2

    acno,month,amount

    table 2 has 12lakhs records approx

    update table t set t.col1=(select sum(amount) from table where acno=t.acno and month='01-jan-2008')

    for running this query its taking hours together and not responding
    please help me to immediate update (iam using oracle 10g/9i)
    advance thanks

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    How many rows do you have in each table?
    Are your statistics up-to-date?
    Please post Explain Plan.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Feb 2008
    Posts
    2
    1st table 1lakh 2nd table 12 lakhs

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    firstly lakhs mean nothing to most people

    secondly why not answer the question put to you?

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