Solved

SET SHOWPLAN_XML: EstimateRows and the EstimatedTotalSubtreeCost

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mysql database, schema and table creation 13 57
How to search for strings inside db views 4 36
SubQuery link 4 35
too many installs coming along with SQL 2016? 1 16
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Creating and Managing Databases with phpMyAdmin in cPanel.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 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