Where is the bottleneck?

Posted on 2012-08-28
Last Modified: 2012-08-28
Hi, I hope I can explain my issue and get some ideas:

I basically load QueryResults into a dataset and loop through those results and perform calculations on the results.

This is all happening fine when my QueryResults are, lets say > 500 records.  Once the QueryResults become a set of 1500 rows, for example, my server load on the DB goes way high and the operations take a minute instead of 5 seconds or less.

Where do I need to split the operations.  Is 1500 rows just too big a result to process?  

Question by:kapes13
    LVL 12

    Accepted Solution

    Have a look at the estimates execution plan perhaps. The items with the highest percent are the problem areas. Is there a table scan in the plan? that would be traditionally the biggest bottleneck.

    Author Comment

    Yup I am looking over those times right now, it seems the first band of processing can handle substantially more objects than the second batch (where records go from the 400 to the 1500, of course), but I am still trying to see where the lapse would be since they run the same logic, but you are on the right path for sure, and I know I am too, it's just at which point I want to draw the final line.

    Author Closing Comment

    Hopefully the CPU times are accurate and I did not miss some memory hole somewhere that is not allowing the record set to really be processed in the proper area, so we are swapping out some processing routines and letting the smaller record sets do the bulk of the processing and see how that pans out, thanks all.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now