Showing posts with label bit. Show all posts
Showing posts with label bit. Show all posts

Wednesday, March 21, 2012

number of CPUs that are assigned to each NUMA node

Hello,
SQL Server STD edition with sp2 plus cumlative update package 2
os = 2003 enterprise edition 64 bit.
After looking at http://support.microsoft.com/kb/329204
I was wondering how to detect the number of CPUs that are assigned to each
NUMA node.
I have issued the following :
SELECT DISTINCT memory_node_id
FROM sys.dm_os_memory_clerks
with the return of:
Memory_node_id
0
3
1
2
I believe this indicates that hardware NUMA is enabled.
This box has 4 dual core procs.
TIA,Yes, and I believe that relates back to parent_node_id in
sys.dm_os_schedulers
--
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:A7FB4D85-F710-4CC1-843C-8A8D80D167BB@.microsoft.com...
> Hello,
> SQL Server STD edition with sp2 plus cumlative update package 2
> os = 2003 enterprise edition 64 bit.
> After looking at http://support.microsoft.com/kb/329204
> I was wondering how to detect the number of CPUs that are assigned to each
> NUMA node.
> I have issued the following :
> SELECT DISTINCT memory_node_id
> FROM sys.dm_os_memory_clerks
> with the return of:
> Memory_node_id
> 0
> 3
> 1
> 2
> I believe this indicates that hardware NUMA is enabled.
> This box has 4 dual core procs.
> TIA,sql

Friday, March 9, 2012

Nullable Bit Field Storage

How does SQL store a collection of bit fields when they are nullable? I
know that it stores the first 8 bits of a table in the same byte to save
storage, but a nullable bit field is essentially a tri-state and can't
possibly be stored in a single bit.Each row contains a separate null bitmap with a bit representing the null
state of each column.
Hope this helps.
Dan Guzman
SQL Server MVP
"Brad" <me@.privacy.net> wrote in message
news:MPG.1a70ba8015d9aeee98bb01@.news...
quote:

> How does SQL store a collection of bit fields when they are nullable? I
> know that it stores the first 8 bits of a table in the same byte to save
> storage, but a nullable bit field is essentially a tri-state and can't
> possibly be stored in a single bit.
|||In article <Oc027982DHA.556@.TK2MSFTNGP11.phx.gbl>, danguzman@.nospam-
earthlink.net said...
quote:

> Each row contains a separate null bitmap with a bit representing the null
> state of each column.

How is that sized? Is it one byte for every eight nullable columns?|||From the Books Online <createdb.chm::/cm_8_des_02_92k3.htm>:
Null Bitmap (Null_Bitmap) = 2 + (( Num_Cols + 7) / 8 )
Hope this helps.
Dan Guzman
SQL Server MVP
"Brad" <me@.privacy.net> wrote in message
news:MPG.1a7133c92572518f98bb05@.news...
quote:

> In article <Oc027982DHA.556@.TK2MSFTNGP11.phx.gbl>, danguzman@.nospam-
> earthlink.net said...
null[QUOTE]
> How is that sized? Is it one byte for every eight nullable columns?

Nullable Bit Field Storage

How does SQL store a collection of bit fields when they are nullable? I
know that it stores the first 8 bits of a table in the same byte to save
storage, but a nullable bit field is essentially a tri-state and can't
possibly be stored in a single bit.Each row contains a separate null bitmap with a bit representing the null
state of each column.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Brad" <me@.privacy.net> wrote in message
news:MPG.1a70ba8015d9aeee98bb01@.news...
> How does SQL store a collection of bit fields when they are nullable? I
> know that it stores the first 8 bits of a table in the same byte to save
> storage, but a nullable bit field is essentially a tri-state and can't
> possibly be stored in a single bit.|||In article <Oc027982DHA.556@.TK2MSFTNGP11.phx.gbl>, danguzman@.nospam-
earthlink.net said...
> Each row contains a separate null bitmap with a bit representing the null
> state of each column.
How is that sized? Is it one byte for every eight nullable columns?|||From the Books Online <createdb.chm::/cm_8_des_02_92k3.htm>:
Null Bitmap (Null_Bitmap) = 2 + (( Num_Cols + 7) / 8 )
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Brad" <me@.privacy.net> wrote in message
news:MPG.1a7133c92572518f98bb05@.news...
> In article <Oc027982DHA.556@.TK2MSFTNGP11.phx.gbl>, danguzman@.nospam-
> earthlink.net said...
> > Each row contains a separate null bitmap with a bit representing the
null
> > state of each column.
> How is that sized? Is it one byte for every eight nullable columns?