Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 520857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:11:20+00:00 2026-05-13T08:11:20+00:00

I am trying to speed up a long running query that I have (takes

  • 0

I am trying to speed up a long running query that I have (takes about 10 minutes to run…). In order to track down what part of the query is costing me the most time I included the Actual Execution Plan when I ran it and found a particular section that was taking up 55% (screen shot below)

alt text http://img109.imageshack.us/img109/9571/53218794.png

This didn’t quite seem right to me so I added Print '1' and Print '2' before and after this trouble section. When I run the query for a mere 17 seconds and then cancel it the 1 and 2 print out which I’m assuming means it’s getting through that section in the first 17 seconds.

alt text http://img297.imageshack.us/img297/4739/66797633.png

Am I doing something wrong here or is my Execution plan misleading me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:11:20+00:00Added an answer on May 13, 2026 at 8:11 am

    I wouldn’t trust that printing the ‘1’ and ‘2’ will prove anything about what has executed and what has not. I do the same thing, but I just wouldn’t rely on it as proof. You could print the @@rowcount from that first insert query – that would indicate for sure that the insert has occurred.

    Although the plan says that query may take 55% of the cost, it may not be 55% of the execution time, especially if the query results are cached.

    Another advantage of printing the @@rowcount is to compare the actual number of rows to the estimated rows (51K). If they differ by a lot then you might investigate the statistics for your indexes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a long-running msbuild script that I'm trying to speed up. Is there
I'm trying to speed up my code because it's running very long. I already
I have some long-running operations that number in the hundreds. At the moment they
I have a long running process called ImportProductInformation called by a consoleapp that I'm
I am trying to speed my gui that loads very slow slow when I
I am trying to speed up an often used query. Using a CompiledQuery seemed
I'm trying to speed up (or slow down) the Galleria imageslider by button. Is
See Down farther: I have a list I converted to a very very long
I am trying clojurescript and find it takes a long time to compile a
I am trying to parse large strings that I have loaded into memory from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.