KDB-X Release Notes

This page details the latest features and improvements released to KDB-X.

KDB-X Public Preview

Release date - 2025.06.25

Note

KDB-X Public Preview Community Edition is a test version and is NOT intended, NOR supported, for production usage. Features are subject to change.

New features and improvements

The following are the highlights of changes since our initial test release.

  1. Community license support

  2. .Q.lim resource limits

  3. Limit improvements

  4. Versioning and startup

  5. Configuration file support

  6. Embedded components: q.k and kxsql

  7. Telemetry

  8. Console enhancements

  9. AI Libraries

1. Community license support

Support has been added for the new community kc.lic license with embedded resource limits; cores, threads, memory, and connections.

2. .Q.lim resource limits

.Q.lim[] returns resource limits, for example:

q

Copy
q).Q.lim[]
cores  | 24
threads| 4
mem    | 17179869184
conns  | 8
                    

3. Limit improvements

We have added several limit changes to the KDB-X experience, including:

1. The core limit is now checked on startup versus CPU affinity.

2. The thread limit restricts the number of secondary threads a process can enable, for example:

bash

Copy
$ q -s 9 
'max number of secondary threads 8

A non-zero thread limit also disables multi-threaded input (negative port) mode:

bash

Copy
$ q -p -4321
'-port disabled                  

3. The memory limit (in bytes) is triggered if operations cause the process heap to breach the limit and cause a 'stop error:

q

Copy
q)b:til 100000000
q)do[20;a,:b]
'stop                    

Once the heap memory limit is breached, individual operations are limited to a stack of 64MB, or fail with a 'stop error:

q

Copy
q)til 10000000
'stop                    

Additionally, if the heap memory limit is breached, variable assignment/modification is also blocked:

q

Copy
q)c:1
'noupdate: `. `c                   

An exception is made for delete operations, allowing you to reduce memory usage. For memory reduction to be reflected on the heap, it may be necessary to explicitly garbage collect:

q

Copy
q)delete a from`.;
q)c:1 / assignment re-enabled
q)til 10000000 / 64MiB stack limit removed
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30..         

4. The conns limit restricts the number of simultaneous IPC connections (inbound and outbound) a process can have.

q

Copy
q)hopen each 8#1234;
q)hopen 1234
'conn               

Note

This limit also applies to one-shot IPC and HTTP connections, and connections registered on the main loop via sd1().

4. Versioning and startup

The version (major.minor.patch) and startup environment are available using .z.v with the following environment defaults:

  • Default QCFG set to $HOME/.kx/config (or %USERPROFILE%\.kx\config)

  • Default QHOME set dynamically one level up (..) from the executable path

  • Default QLIC is "" (empty) indicating that it checks QHOME for a license

  • Default QINIT is "q.q"

 

Copy
$ ~/.kx/bin/q
q).z.v
version| "0.1.0t"
QCFG   | "/home/homer/.kx/config"
QHOME  | "/home/homer/.kx"
QLIC   | ""
QINIT  | "q.q"

5. Configuration file support

Define key-value pairs in a config file (default: ~/.kx/config) to modify environment variables:

 

Copy
$ cat ~/.kx/config  # default config location
QLIC =/tmp/kdbx/lic
QINIT=kdbx.q
$ q
q)`QLIC`QINIT#.z.v
QLIC | "/tmp/kdbx/lic"
QINIT| "kdbx.q"

To set an alternative path for the config file, use the QCFG environment variable:

Bash

Copy
$ QCFG=~/.kx/config2 q
q).z.v`QCFG
"/home/homer/.kx/config2"

Alternatively, set QCFG through the -v command-line flag, which takes priority over the envvar:

Bash

Copy
$ q -v ~/.kx/config3
q).z.v`QCFG
"/home/homer/.kx/config3"

Inspect loaded config values (including user-defined key=value pairs) using .Q.cfg:

Bash

Copy
$ cat ~/.kx/config
QINIT=simpson.q
name=Homer
address=742 Evergreen Terrace
$ q
q).Q.cfg
| ""
QINIT  | "simpson.q"
name   | "Homer"
address| "742 Evergreen Terrace"

You can also use the config file to set command-line options, using single-character keys:

Bash

Copy
$ cat ~/q/.config
e=1
p=1234
c=25 100
$ q
q)\e
1i
q)\p
1234i
q)\c
25 100i

Explicit command-line options override config file values:

Bash

Copy
$ q -p 4321
q)\e
1i
q)\p
4321i

6. Embedded components: q.k and kxsql

q.k is now embedded in the executable, with loaded functions visible and the full text available as .Q.qk:

q

Copy
q).Q.qk
"\\d .q"
"/each: +-*%&|^<>=$ <= >= <> @ ? in within bin div abs log exp sqrt sin cos t..
"neg:-:;not:~:;null:^:;string:$:;reciprocal:%:;floor:_:;ceiling:-_-:;signum:{..
"mod:{x-y*x div y};xbar:{$[9h=t:abs[@x];x*r+y=x*1+r:(y:9h$y)div x;x*y div x:$..

The SQL engine kxsql (formerly s.k) is embedded in the executable and can be initialized with .s.init[]:

q

Copy
q)t:([]a:1 2 3;b:4 5 6)
q).s.init[]
s)select * from t
..

Use .s.e to execute SQL and save the results, for example:

q

Copy
q)t:([]a:1 2 3;b:4 5 6)
q)t~.s.e"select * from t"

Access the kxsql release date is accessible with .s.rel:

q

Copy
q).s.rel
2025.01.16

7. Telemetry

Check telemetry status with .Q.tel[]. Returns 1b if telemetry is enabled, 0b if not. Status depends on license type and specifics.

q

Copy
.Q.tel[]

8. Console enhancements

You can now auto-size rows and columns independently using \c.

q

Copy
q)\c
25 80i
q)\c 50 0N
q)\c
50 100i
q)\c 0N 50
q)\c
30 50i
q)\c 0N 0N
q)\c
30 100i

Previously, you could only set both together with 0N 0N and worked with invalid row/column values. Now it requires explicit 0N for row/column size:

q

Copy
q)/ before
q)\c aa bb
q)\c
30 100i
q)/ after
q)\c aa bb
'domain

9. AI Libraries

Added support for advanced AI libraries enabling high-performance semantic search on unstructured data and time series similarity search (TSS).

NUC (Not Upwardly Compatible)

Note

We aim to avoid introducing compatibility issues. Most of the changes below result from unifying behavior or tightening previously undefined or inconsistent cases.

  1. Licenses: search path for licenses no longer includes the current working directory (cwd).

  2. Scripts: search path for scripts now includes $QHOME/q/, searched after cwd and before $QHOME/.

  3. Libraries: search path for libraries now includes $QHOME/lib/, searched after cwd and before $QHOME/[.z.o].

  4. Standardized license errors: KDB-X now returns consistent license error messages, for example:

q

Copy
'license error: no license loaded
'license error: daemon connection failed
'license error: daemon timeout
'license error: daemon returned error

Come back soon and try out more features and improvements as we add them to KDB-X!