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 6337851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:19:49+00:00 2026-05-24T19:19:49+00:00

I am trying to increase one of my request performance. My request is made

  • 0

I am trying to increase one of my request performance.
My request is made of 10 different select .

The actual production query is taking 36sec to execute.

If I display the execution plan, for one select I have a query cost of 18%.

So I change a in clause (in this select) with an xml query (http://www.codeproject.com/KB/database/InClauseAndSQLServer.aspx).

The new query now takes 28 sec to execute, but sql server tells me that the above select has a query cost of 100%. And this is the only change I made. And there is no parallelism in any query.

PRODUCTION :
36sec, my select is 18% (the others are 10%).

NEW VERSION :
28sec, my select is 100% (the others are 0%).

Do you have any idea how sql server compute this “query cost” ? (I start to believe that it’s random or something like that).

  • 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-24T19:19:51+00:00Added an answer on May 24, 2026 at 7:19 pm

    Query cost is a unitless measure of a combination of CPU cycles, memory, and disk IO.

    Very often you will see operators or plans with a higher cost but faster execution time.

    Primarily this is due to the difference in speed of the above three components. CPU and Memory are fairly quick, and also uncommon as bottlenecks. If you can shift some pressure from the disk IO subsystem to the CPU, the query may show a higher cost but should execute substantially faster.

    If you want to get more detailed information about the execution of your specific queries, you can use:

    SET STATISTICS IO ON
    SET STATISTICS TIME ON
    

    This will output detailed information about CPU cycles, plan creation, and page reads (both from disk and from memory) to the messages tab.

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

Sidebar

Related Questions

I've recently started trying to increase my sites performance. One of the biggest obstacles
I am trying to measure the performance increase of inlining an accessor into a
In an effort to increase performance, I was thinking of trying to eliminate a
I've been trying to increase performance and diagnose deadlocks on a SQL Server 2005
There is a stored procedure that we're trying to increase the performance of... at
I'm trying to understand when the usage of parallel will increase the performance. I
I'm trying to increase the number of items shown in the Run MRU list.
I am trying to increase the size of the image by 20. So I
I am trying to increase a variable's value while uibutton is kept pressing. But
I'm currently debugging some fairly complex persistence code, and trying to increase test coverage

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.