Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


The line While dr.Read() is SLOW!

The line While dr.Read() is SLOW!

The line While dr.Read() is SLOW!

I run the exact same site on 2 servers.  I use a datareader to cycle through my main data.  It look like this:

   While drRecords.Read()
        Call DetailLine(intI)
   End While

One one server, it very fast. On the other it is so slow it usually times out. I have narrowed the line to the first time the "While drRecords.Read()" is called.  It literally takes about 75 seconds for 65 rows.  The weird thing is this runs slow on a server with 4gig of ram and 4processers.   It runs extrememely fast on a crappy test server.

Both servers have .Net sp2 and mdac 2.7.

Any ideas why it's running slow?

Thanks for your help!


RE: The line While dr.Read() is SLOW!

could be a network problem between the web server and the data server...

possibly the "crappy" server has a better connection to the data store...  this was the case once for me in ASP classic.

Keep in mind that the datareader is a connected object, so it's only going to be as fast as it's connection to the data.  Generally speaking, the datareader should be a very high performance object.

RE: The line While dr.Read() is SLOW!

For anyone interested... the entire problem was a database problem.  Even though the test and database were basically defined as the same,  they both were different enough that the production database used different indexes that made the entire query about 2 minutes slower that it should.  How frustrating!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close