Solved

Slow RecordSet update question

Posted on 2010-11-23
4
551 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
PaperPort is a popular document imaging/management product from Nuance Communications (http://www.nuance.com/). It is in widespread use by both individuals (http://www.nuance.com/for-individuals/by-product/paperport/index.htm) and businesses (http:/…
Microsoft Office Picture Manager is not included in Office 2013. This comes as quite a surprise to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This video expla…
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now