Solved

Slow RecordSet update question

Posted on 2010-11-23
4
555 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 500 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article discusses the PaperPort 14 Scanner Connection Tool, which Nuance provides at no charge in order to fix scanning problems in Windows 8. Furthermore, users of PaperPort 14 in Windows 7 and Windows 10 have reported that the tool works in t…
I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
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…

786 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