2019.08.09 02:54 AM
/ Start with negative -s in command line
/KDB+ 3.6 2019.04.02 Copyright (C) 1993-2019 Kx Systems/w32/ 8()core 4095MB me my-host xxx.xxx.xxx.xxx NONEXPIRE
/ Setup database
N:1000000;
{.Q.dd[`:./db;(`$string x;`T;`)]set@[;`sym;`p#].Q.en[`:./db]`sym xasc([]sym:N?`1;px:N?100.;size:N?1000)}each .z.D-til 3;
system"l ./db";
tables[]
/ Setup parallel slaves
ports:55500+til neg system"s";
(system"start q . -p ",string@)each ports;
.z.pd:{n:abs system"s";$[n=count handles;handles;[hclose each handles;:handles::`u#hopen each ports]]}
handles:`u#`int$();
system"title MASTER";
.z.pd[]@\:({system"title ",string system"p"};`)
/ Test query
select size wavg px by sym from T where date=.z.D,sym in`a / This runs properly
select size wavg px by sym from T where date=.z.D,sym in`a`b / This fails with 'length
2019.08.09 04:16 AM
2019.08.09 08:25 AM
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.