Solved

SET SHOWPLAN_XML: EstimateRows and the EstimatedTotalSubtreeCost

Posted on 2011-03-10
4
869 Views
Last Modified: 2012-05-11
Hi experts, i am reading about SET SHOWPLAN_XML (Transact-SQL)
but i do not understand this line
 "The values in the EstimateRows and the EstimatedTotalSubtreeCost attributes are smaller for the first indexed query, indicating that it is processed much faster and uses fewer resources than the nonindexed query"

can you explain me?

I attached two file
query-1.jpg
query-2.jpg
0
Comment
Question by:enrique_aeo
4 Comments
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
Simply put a query using an index on a table.column is much faster and consumes less resources that a query (query2) that is NOT using an index.
To optimize query 2 you could add an index on Employee.Title column just make sure that you use LIKE with only one % as per above. What I mean is that a LIKE "%Production%' won't use an index even is you have one.
0
 

Author Comment

by:enrique_aeo
Comment Utility
ok, but it means the difference of values ¿¿of Estimated Subtree Cost and EstimateRows?
0
 
LVL 25

Accepted Solution

by:
jogos earned 250 total points
Comment Utility
Why difference in value?  It is not because your result is the same that SQL had the same effort to produce your result.

First query can find your result directly because  = on indexed columns
2nd query 'like' -> there are more records to evaluate before giving the result, probably same single record

meaning of 'estimate' is important
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

11 Experts available now in Live!

Get 1:1 Help Now