Solved

Slow RecordSet update question

Posted on 2010-11-23
4
558 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Microsoft Office Picture Manager has a Picture Shortcuts pane that shows a list with the Recently Browsed folders. While creating my video Micro Tutorial here at Experts Exchange showing How to Install Microsoft Office Picture Manager in Office 2013…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

635 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