Solved

Slow RecordSet update question

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

In a previous article here at Experts Exchange (http://www.experts-exchange.com/articles/18414/Create-a-PDF-file-with-Contact-Sheets-montage-of-thumbnails-for-all-JPG-files-in-a-folder-and-each-of-its-subfolders-using-an-automated-batch-method.html)…
PaperPort 14.5 Patch 1 update is often not detected or downloaded automatically. This article provides direct download links to solve the problem for retail (non-bundled) versions of the Standard and Professional editions, as well as the Professiona…
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…
This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles al…

734 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