Changes in 2.6

Below is a summary of changes from V2.5. Commercially licensed users may obtain the detailed change list / release notes from (http://downloads.kx.com)

Production release date

2009.09.15

IPC Compression

Compresses data over TCP/IP connections if

  • uncompressed serialized data has a length greater than 2000 bytes
  • connection is not localhost
  • size of compressed data is less than half size of uncompressed data
  • both parties are version 2.6 or above

timestamp – new type

  • timestamp, nanosecond precision, type -12h, system datetime as .z.p or .z.P,
  • cast with `timestamp$…, parse with "P"$
  • range 1709.01.01 to 2290.12.31
  • Timestamp is blocked (signalled via 'type) from sending to versions of kdb+ <2.6

timespan – new type

  • timespan, nanosecond precision, type -16h, system time as .z.n or .z.N
  • cast with `timespan$… parse with "N"$…
  • range -106751D23:47:16.854775806 to 106751D23:47:16.854775806
  • Timestamp is blocked (signalled via 'type) from sending to versions of kdb+ <2.6

Binding to a specific network address

Binds to a specific address when listening for IPC connections (can be useful on a multihomed host)

e.g.

\p 127.0.0.1:5000

Named Service Support

Allows symbolic lookups to map service names to ports

e.g.

$grep kdb /etc/services
kdb     5000/tcp #
…
q)\p 127.0.0.1:kdb
q)\p
5000

Can start q process as

q -p localhost:kdb
q -p 127.0.0.1:kdb
q -p :kdb
q -p :5000
q -p 5000
q -p kdb

and all those variations again as

q)\p ...
also when opening connections
q)h:hopen `:localhost:kdb

/ error reporting - attempt to use a non-existent entry from /etc/service
q -p 127.0.0.1:kdbx
'kdbx
q)\p kdbx
'kdbx

.z.W

.z.W changed to return a dictionary of IPC handles with int vectors showing the size in bytes of each message waiting in their output queues. The previous version's behavior can be obtained with sum each .z.W

e.g.

q)h:hopen ...
q)h
4
q)do[3;(neg h)({};til 1000000)];.z.W
4| 4000030 4000030 4000030
q).z.W
4| 0

.z.ts

.z.ts is now passed a timestamp instead of a datetime

e.g.

q).z.ts:{0N!x}
q)\t 1000
2009.09.14D10:16:22.204635000

xasc/xdesc

sort only if not already sorted. Allows () xasc t

.Q.w

.Q.w[] – prints dict of memory stats (\w and \w 0) for easy reading

q).Q.w[]
used| 4323152
heap| 67108864
peak| 335544320
wmax| 0
mmap| 56
syms| 534
symw| 28915

-17!x

Allows a kdb+ format file generated by a non-native architecture to be read in full.

Intended for migrating data between different endian cpu architectures (e.g. Sparc to x86).

Should not be used as method of "sharing" the same file between systems as it is relatively inefficient. It does not map data, it reads the file in full.

SIGTERM

Reception of SIGTERM signal has the same effect as exit 0 at the command line, i.e. processed when current task has completed. Graceful shutdown can be obtained through hooking .z.exit.

\w

\w now reports (M0 sum of allocs from M1;M1 mapped anon;M2 peak of M1;M3 workspace limit;M4 mapped files).

e.g.

q)\w
122560 67108864 67108864 0 0j
q)a:til 100000000
q)\w
536998128 603979776 603979776 0 0j
q)delete a from `.
`.
q)\w
127184 67108864 603979776 0 0j
q)`:.test set til 10000
`:test
q)a:get`:.test
q)\w
127712 67108864 603979776 0 40016j

q prompt

q prompt shows namespace

e.g.

q)\d .test
q.test)\d .util
q.util)\d .
q)

Partitioned table schemas

are derived from the most recent (last) partition. This is in contrast to previous releases which used the oldest (first) partition to get a list of tables and their schemas.

\p [-]0W

listens on next available port

select from `table

as from 2.6 release 2009.08.20 allow select from `t (and exec from `t) (like meta) just to help users avoid having to use get