January 5, 2017 at 9:33 am
This is really an interesting finding, please refer to my screenshots.
What am I missing here? I cannot understand this finding.
January 5, 2017 at 9:36 am
What happens when you run them both at the same time?
January 5, 2017 at 9:40 am
I did run them at the same time, it's just the count(1) takes longer and the select * takes less than 1 second.
January 5, 2017 at 9:45 am
Run
SET ROWCOUNT 0
and try again.
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
January 5, 2017 at 9:53 am
You got it, but can you elaborate this? wouldn't that mean potentially every query must do the rowcount reset?
Thanks.
January 5, 2017 at 9:58 am
halifaxdal (1/5/2017)
You got it, but can you elaborate this? wouldn't that mean potentially every query must do the rowcount reset?Thanks.
https://msdn.microsoft.com/en-us/library/ms188774.aspx
and
https://msdn.microsoft.com/en-us/library/ms190356.aspx
It only has to be reset once it's been set. I recommend that you track down where it is being used and replace it with TOP().
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
January 5, 2017 at 10:02 am
ChrisM@Work (1/5/2017)
halifaxdal (1/5/2017)
You got it, but can you elaborate this? wouldn't that mean potentially every query must do the rowcount reset?Thanks.
https://msdn.microsoft.com/en-us/library/ms188774.aspx
and
https://msdn.microsoft.com/en-us/library/ms190356.aspx
It only has to be reset once it's been set. I recommend that you track down where it is being used and replace it with TOP().
Thank you for your help. It's much appreciated.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply