May 7, 2012 at 11:51 pm
I picked no because of the COUNT_BIG requirement, but also because it is not known if ANSI_NULLS and QUOTED_IDENTIFIER were ON when the table was created. (and ANSI_NULLS when the view was created)
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 8, 2012 at 12:49 am
Wow, did a google search and there was no mention in any of the four posts I checked about the count_big so I got it wrong. Nice Q and nice reference article.
May 8, 2012 at 1:07 am
I have created numerous indexed views and answered numerous questions about them here on ssc as well, made this an easy question. Thanks!
May 8, 2012 at 1:49 am
Nice one, thank you
Iulian
May 8, 2012 at 2:45 am
dogramone (5/8/2012)
Wow, did a google search and there was no mention in any of the four posts I checked about the count_big so I got it wrong.
You would have found it if you checked Books Online: http://msdn.microsoft.com/en-us/library/ms191432.aspx. We all like to bash BOL when we find something missing or a documentation error, but in reality I still think SQL Server is one of the best documented programs on the market.
EDIT: Forgot to add: Nice question, but the code was a bit hard to read. May I suggest that the next time someone uses a screenshot for the question instead of just providing the code, he or she first increases the font size?
May 8, 2012 at 2:54 am
This was removed by the editor as SPAM
May 8, 2012 at 7:16 am
Interesting count & count_big. Learned something today. Thanks.
May 8, 2012 at 7:43 am
Hugo Kornelis (5/8/2012)
dogramone (5/8/2012)
Wow, did a google search and there was no mention in any of the four posts I checked about the count_big so I got it wrong.You would have found it if you checked Books Online: http://msdn.microsoft.com/en-us/library/ms191432.aspx. We all like to bash BOL when we find something missing or a documentation error, but in reality I still think SQL Server is one of the best documented programs on the market.
Agreed. AND BOL does have space for comments, so if it IS incorrect, we have the ability to fix it, rather than just complaining.
EDIT: Forgot to add: Nice question, but the code was a bit hard to read. May I suggest that the next time someone uses a screenshot for the question instead of just providing the code, he or she first increases the font size?
Agreed. They could also either 1) use PNG instead of JPG, or 2) increase the JPG quality setting of their screenshot app so there's not so much lossy compression.
The question itself was quite good, and the link provided in the explanation really does provide a good explanation of why this happens. (Essentially, SQL Server requires COUNT_BIG() on indexed views to prevent a potential overflow for tables with large numbers of rows.)
I got the question right because the existence of the question implied there was an issue, learned about the issue, and got a chance to comment! Win-win-win!
May 8, 2012 at 8:06 am
Good question and explanation.
May 8, 2012 at 8:13 am
Good Question Ron.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 8, 2012 at 8:39 am
Nice question, thanks!
May 8, 2012 at 9:01 am
Hugo Kornelis (5/8/2012)
dogramone (5/8/2012)
Wow, did a google search and there was no mention in any of the four posts I checked about the count_big so I got it wrong.You would have found it if you checked Books Online: http://msdn.microsoft.com/en-us/library/ms191432.aspx. We all like to bash BOL when we find something missing or a documentation error, but in reality I still think SQL Server is one of the best documented programs on the market.
EDIT: Forgot to add: Nice question, but the code was a bit hard to read. May I suggest that the next time someone uses a screenshot for the question instead of just providing the code, he or she first increases the font size?
Ran and ran again to check using IE 7 Windows XP on a 17 inch monitor, zoom set to 100%, my vision with glasses on, checked just last week at 20/20 and I have NO problem reading the question what so ever.
Any suggestions so that I can satisfy those who have stated that it was / is difficult to read ?
May 8, 2012 at 9:14 am
bitbucket-25253 (5/8/2012)
Hugo Kornelis (5/8/2012)
dogramone (5/8/2012)
Wow, did a google search and there was no mention in any of the four posts I checked about the count_big so I got it wrong.You would have found it if you checked Books Online: http://msdn.microsoft.com/en-us/library/ms191432.aspx. We all like to bash BOL when we find something missing or a documentation error, but in reality I still think SQL Server is one of the best documented programs on the market.
EDIT: Forgot to add: Nice question, but the code was a bit hard to read. May I suggest that the next time someone uses a screenshot for the question instead of just providing the code, he or she first increases the font size?
Ran and ran again to check using IE 7 Windows XP on a 17 inch monitor, zoom set to 100%, my vision with glasses on, checked just last week at 20/20 and I have NO problem reading the question what so ever.
Any suggestions so that I can satisfy those who have stated that it was / is difficult to read ?
I also have no problem reading it and I am old. So there must be some variance in the way it renders.
May 8, 2012 at 9:34 am
Cliff Jones (5/8/2012)
bitbucket-25253 (5/8/2012)
Hugo Kornelis (5/8/2012)
dogramone (5/8/2012)
Wow, did a google search and there was no mention in any of the four posts I checked about the count_big so I got it wrong.You would have found it if you checked Books Online: http://msdn.microsoft.com/en-us/library/ms191432.aspx. We all like to bash BOL when we find something missing or a documentation error, but in reality I still think SQL Server is one of the best documented programs on the market.
EDIT: Forgot to add: Nice question, but the code was a bit hard to read. May I suggest that the next time someone uses a screenshot for the question instead of just providing the code, he or she first increases the font size?
Ran and ran again to check using IE 7 Windows XP on a 17 inch monitor, zoom set to 100%, my vision with glasses on, checked just last week at 20/20 and I have NO problem reading the question what so ever.
Any suggestions so that I can satisfy those who have stated that it was / is difficult to read ?
I also have no problem reading it and I am old. So there must be some variance in the way it renders.
Your old ... nah .. your just a young whipper snapper, now I am old, to know how old trying running this
SELECT DATEDIFF ( yy , '04/18/1932', GETDATE() ) or look at my profile. Now some who know me say that I am 3 days older than dirt, and on some days I do feel that way.
Viewing 15 posts - 1 through 15 (of 31 total)
You must be logged in to reply to this topic. Login to reply