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


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Sunday, January 19, 2014 5:00 PM
Points: 605, Visits: 1,690
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: Tuesday, February 25, 2014 7:04 PM
Points: 176, Visits: 563
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


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 11:47 PM
Points: 20,458, Visits: 14,082
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


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: Monday, March 17, 2014 7:18 AM
Points: 2,439, Visits: 6,426
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 :-(


--------------------------------------------------------------------------
A little knowledge is a dangerous thing (Alexander Pope)

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: Tuesday, February 25, 2014 7:04 PM
Points: 176, Visits: 563
[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: Wednesday, December 11, 2013 7:12 AM
Points: 366, Visits: 455
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
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, April 11, 2014 3:58 AM
Points: 820, Visits: 167
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: Friday, March 14, 2014 8:26 AM
Points: 267, Visits: 674
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