Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

COUNT_BIG Expand / Collapse
Author
Message
Posted Monday, March 08, 2010 8:10 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, May 27, 2010 1:31 PM
Points: 132, Visits: 101
Comments posted to this topic are about the item COUNT_BIG
Post #879054
Posted Monday, March 08, 2010 8:11 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: 2 days ago @ 12:43 AM
Points: 584, Visits: 1,574
Gosh, I'm the FIRST person to answer this QotD!

Thanks for the questions Prakriti.

S.
Post #879055
Posted Monday, March 08, 2010 10:20 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, April 11, 2013 12:58 AM
Points: 174, Visits: 555
I read up what is the definition of count_big before I answered half-blindly. I never used it before and I may use it only years from now, since our transactional data is still too far from 2 billion rows (int, 4 bytes).

But thanks anyway.

*edited - our table with highest number of rows is still too far from even 10 million.
Post #879111
Posted Tuesday, March 09, 2010 12:16 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:33 PM
Points: 18,858, Visits: 12,443
Maybe this is a bit nitpicky, but the answer explanation doesn't seem to match the answer.


The answers are: SELECT COUNT_BIG(*) and SELECT COUNT_BIG(column_2).


This sentence does not match the correct answers. It seems somewhat confusing and could create a bit of a stir.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #879153
Posted Tuesday, March 09, 2010 12:34 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 3:10 PM
Points: 2,319, Visits: 6,105
I too had to look up COUNT_BIG in BOL since i wasn't even aware it existed. So thanks for the question, I learned something new yet again. Still got the answer wrong though. I realized a split second after clicking the Answer button that the point was gone :-(


--------------------------------------------------------------------------

The function of good software is to make the complex appear to be simple. (Grady Booch)

In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)
Post #879159
Posted Tuesday, March 09, 2010 12:51 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, April 11, 2013 12:58 AM
Points: 174, Visits: 555
[b]CirquedeSQLeil (3/9/2010)


The answers are: SELECT COUNT_BIG(*) and SELECT COUNT_BIG(column_2).


This sentence does not match the correct answers. It seems somewhat confusing and could create a bit of a stir.


This is wiered...I answered II and III, thereby getting both correct?
SELECT COUNT_BIG(column_2)
SELECT COUNT_BIG(ALL column_2)

ALL is the default and hence COUNT_BIG(column 2) is same as COUNT_BIG(ALL column_2). This evaluates expression for each row in a group and returns the number of nonnull values.


Maybe the first paragraph of the explanation was wrong?

The answers are: SELECT COUNT_BIG(*) and SELECT COUNT_BIG(column_2). COUNT_BIG(*) will count all rows from the table (including duplicate & null rows). COUNT_BIG(DISTINCT column_2) will evaluate distinct non-null values.


If the correct answers are different from mine, it's alright for me to have my points deducted. I know I will never be able to verify the answers without wrecking my server's disk space or processing power.

Post #879168
Posted Tuesday, March 09, 2010 1:35 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, December 21, 2012 5:24 AM
Points: 366, Visits: 436
Thanks for the question..hurray I got it correct...but only after reading explanation about it in BOL...I never heard about it before...but its a very useful function...
Yes..the explanation given by OP was wrong..answer II and III is absolutely correct.
Post #879179
Posted Tuesday, March 09, 2010 1:43 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, February 18, 2013 5:19 AM
Points: 703, Visits: 172
Thanks for the question. Learn something new today.
Post #879182
Posted Tuesday, March 09, 2010 2:04 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, June 13, 2013 5:24 AM
Points: 666, Visits: 151
Great question, made you think about the simple functions that we take for granted, even though i have never needed to use count_big
Post #879188
Posted Tuesday, March 09, 2010 3:13 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, June 10, 2013 3:53 AM
Points: 267, Visits: 664
the answer is I and II , not II and III.

does anyone audit these questions? i want my point (joke) :)
Post #879208
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse