March 18, 2010 at 8:30 am
Hi guys, has anyone been hit with this case... I have a query in a batch with a total of 150% query cost. I get that 150 when adding up all the %. I have about 10 operations, #1 is 94%, #2 is 7% and then #3 is 50%.
Check out the plan for query #4 in this batch...
March 18, 2010 at 8:35 am
It's not particularly uncommon. I had a set of queries whose total cost added to 200% the other day. I think it's Kevin (TheSQLGuru) who has a plan somewhere with a single operator at 1000%.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 18, 2010 at 8:39 am
When I open the plan, I get 11%, 39%, 25%, 1%, and 0%, for each sub-query, which adds up to 76%, which is obviously just as wrong, but in the opposite direction.
There are reasons I say the estimated costs and their percentages are functionally useless. That's been my take on it for years.
Definitely not a new bug. It's been a problem since at least SQL 2000.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 18, 2010 at 8:51 am
GSquared (3/18/2010)
When I open the plan, I get 11%, 39%, 25%, 1%, and 0%, for each sub-query, which adds up to 76%, which is obviously just as wrong, but in the opposite direction.There are reasons I say the estimated costs and their percentages are functionally useless. That's been my take on it for years.
Definitely not a new bug. It's been a problem since at least SQL 2000.
:hehe: so completly wrong both ways... query 4 is 50% over and the total amount of the queries is wrong too!
Wow, it's the first time I see that... and it's also one of the first systems I use with parrallelism. Can there be a connection?
March 18, 2010 at 9:10 am
Could be. I don't think I've ever used SQL on a single-core machine, so maybe that's why I'm used to seeing wrong numbers.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply