Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    pune
    Posts
    3

    Unanswered: query optimization

    Dear Friends,
    I am having a table with one billon rows. I want to update two columns of the table which dont have index . Query is going for a table scan and my log is getting filled. I dont have any joins on table ,its just a fixed value i want to assign to the columns.
    Eg: update XYZ
    Set column1 =ABC
    ,column2 =PQR
    Please suggest me some ideas to acheive it with minimum cost.
    Please dont me suggest me to do it in a batch and truncate the log after each update.

    Thanks in advance
    lalit

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    In the absence of any indexes, no matter what the trick, optimizer will do a table scan.

    I don't see anything wrong with batching though, at least you can clear the log regularly.

    Cheers,

    Willy

Posting Permissions

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