Results 1 to 2 of 2

Thread: begintrans

  1. #1
    Join Date
    Dec 1969

    Default begintrans

    I tried to update an sql table by using...<BR>update test_table set disable_flag = 1 where batch_id = 1 and seq_num &#062;=1 and seq_num &#060;= 500000<BR><BR>I&#039;m doing this within a BeginTrans on an asp page and it took 5 minutes. <BR><BR>When I increase seq_num to 1000000, it takes over 25 minutes.<BR><BR>I have indexes on batch_id and seq_num.<BR>I tried an OLEDB and FILEDSN connection.<BR><BR>Any idea how to make this faster?<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: begintrans

    Does your field seq_num have any values that are (zero) 0 or less?<BR><BR>If not then you dont need that in your where clause...<BR>&#060;=5000 will sufice...<BR><BR>If you have numbers less than zero then try using "Between" instead...<BR><BR>where batch_id = 1 and (seq_num Between 0 and 500000)<BR><BR>It could be having the same field listed 2 times in the where clause thats slowing it down some...<BR><BR>

Posting Permissions

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