?
Solved

SET SHOWPLAN_XML: EstimateRows and the EstimatedTotalSubtreeCost

Posted on 2011-03-10
4
Medium Priority
?
907 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 35095571
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
ID: 35107081
ok, but it means the difference of values ¿¿of Estimated Subtree Cost and EstimateRows?
0
 
LVL 25

Accepted Solution

by:
jogos earned 1000 total points
ID: 35256686
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

801 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