I think following 2 SARG are culprit in query 3 and 4.
And F.TableName = 'S' --F is Secdeal
And B.TableName = '5' --b is SecSelBuyBck
If there are no proper stats on these columns it must be using default 10% and which might not be correct
I think following 2 SARG are culprit in query 3 and 4.
And F.TableName = 'S' --F is Secdeal
And B.TableName = '5' --b is SecSelBuyBck
If there are no proper stats on these columns it must be using default 10% and which might not be correct