Solved

SET SHOWPLAN_XML: EstimateRows and the EstimatedTotalSubtreeCost

Posted on 2011-03-10
4
887 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 250 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generate PDF from MySQL using PHP 3 55
How efficient to move databases to Azure? 5 57
Change this SQL to get all nodes 3 40
Problem with MySQL query - graph 3 27
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

733 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