August 9, 2016 at 8:12 am
Hi All,
Apart from out of date stats, what can throw these 2 completely out of Sync.
Thanks
Tal.
August 9, 2016 at 8:13 am
I'm talking about row estimates
August 9, 2016 at 9:04 am
Overly complex queries where the optimizer doesn't have time to properly evaluate plans.
August 9, 2016 at 9:18 am
Data skew.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 9, 2016 at 9:19 am
Talib123 (8/9/2016)
Hi All,Apart from out of date stats, what can throw these 2 completely out of Sync.
Thanks
Tal.
Can you post the actual execution plan you are studying?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 9, 2016 at 9:25 am
A large number of things.
Lack of statistics
Conversions or functions on columns
Table variables (including multi-statement UDFs)
Variables in predicates
Plans being reused for executions with different parameters
Generalising queries (eg the Column = @Parameter OR @Parameter IS NULL)
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
August 9, 2016 at 9:30 am
Lynn Pettis (8/9/2016)
Overly complex queries where the optimizer doesn't have time to properly evaluate plans.
That'll get poor plans, not inaccurate row estimations.
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
August 10, 2016 at 5:54 am
Thanks for taking the time all
Conversions or functions on columns; is the most likely with this piece of code.
This is what I thought but just needed to get a second opinion.
Again Thanks.
August 10, 2016 at 6:32 am
Talib123 (8/10/2016)
Thanks for taking the time allConversions or functions on columns; is the most likely with this piece of code.
This is what I thought but just needed to get a second opinion.
Again Thanks.
If you can post the actual execution plan (as opposed to the estimated plan), then you'd likely get a definitive answer, rather than guesses.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply