"number of internalized symbols"?

What’s the meaning of “number of internalized symbols”?

What operation would change this number.

Many thanks,

PM

http://code.kx.com/wiki/Reference/SystemCommands#.5Cw\_.5B0.5D\_-\_workspace

"\w [0] - workspace

If there is no parameter, lists current memory usage, as a list of 6 long integers:

[0] number of bytes allocated
[1] bytes available in heap
[2] maximum heap size so far
[3] maximum bytes available, given in -w command line parameter
[4] mapped bytes
[5] physical memory

If there is a parameter, returns a pair:

[0] number of internalized symbols
[1] corresponding memory usage"

in kdb there is only one copy for each symbol (an unique char string). the other type of strings are char vectors and they are like the other vectors.

once you declare a symbol ex: `petru this is internalized (hashed) into the symbol storage structure.

when you work with symbols, kdb is using the storage address of the string not the data itself.

Thanks for help!

I was confused b/c I was using short symbols, and the count didn’t change at all:

$> q
//…
q).Q.w[syms] 543 q)a:p
q).Q.w[syms] 543 q)a:abcd q).Q.w[][syms]
543
q)a:p2 q).Q.w[][syms]
543

It has changed once I used longer symbols:

q)a:petru q).Q.w[][syms]
544
q)a:abcdefghijklmnnop q).Q.w[][syms]
545

Is there a way to dump the “symbol storage structure”, so I can see all the 545 symbols?

Regards,
PM

no. that’s internal only.