Solved

SET SHOWPLAN_XML: EstimateRows and the EstimatedTotalSubtreeCost

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

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…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

688 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