Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Slow RecordSet update question

Posted on 2010-11-23
4
Medium Priority
?
561 Views
Last Modified: 2012-05-10
I’m having an issue when updating a record using ADODB.RecordSet, it’s very slow to update. I can pull the data with no problem, fast. Any ideas? Using an ADODB.Connection to SQL2005.


      Set Conn = Server.CreateObject("ADODB.Connection")
      Conn.open Session("starxxx")
      Set RS = Server.CreateObject("ADODB.RecordSet")
      RS.open "ORDER_DB",Conn,2,2
      rs.movefirst
      rs.find "f_id = '" &f_id& "'"

      rs("xxxxx")=…..
      rs("xxxxx")=…..
      rs("xxxxx")=…..
      rs("xxxxx")=…..

      rs.Update
      rs.close
      conn.close
      set conn=nothing
      set rs=nothing

Thanks for the help!
0
Comment
Question by:inrworx
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:phodges4
ID: 34198921
It's possible that f_id is not indexed.  Can you output the table schema?  Also how many rows are in the table.
0
 

Author Comment

by:inrworx
ID: 34200905
Currently I have 198 columns per record and about 25,075 rows/records. Where can I check to see if it’s indexed? I see in SQL that there is an “indexable” field and is marked Yes. Thanks for your help...
f_ID	decimal(18, 0)	Unchecked KEY

Open in new window

0
 

Author Comment

by:inrworx
ID: 34200958
When I do a search for the record it’s pretty fast, so I don’t think that’s the problem. But when I go to write to the record, there is like a 15 sec delay.
0
 
LVL 2

Accepted Solution

by:
phodges4 earned 2000 total points
ID: 34201562
That definition does specify that it is indexed.  You are running SQL2005 and not the express edition or anything, right?  What columns are you updating that are slow?  If you can identify which one slows it down, send me the column definition.  It could be that SQL needs to rebuild the index for that column but there's no reason it should take 15 seconds for one record!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
This article shows how to convert a multi-page PDF file into multiple image files, with one image file created for each page of the PDF. It does this by utilizing an excellent, free software package called GraphicsMagick. The solution is amazingly s…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question