2022.01.12 02:48 PM
2022.01.13 04:12 AM - edited 2022.01.13 06:56 AM
Is there a reason you cannot use -g 1 ?
Running .Q.gc[] so often is not the best approach but if you needed to a timer could check and run if after .z.pg for you:
runGC:0b
.z.pg:{ bigresult: value x;runGC::1b; bigresult };
.z.ts:{if[runGC;.Q.gc[];runGC::0b]}
\t 1
https://code.kx.com/q/ref/dotz/#zts-timer
To run it less often you could set a threshold and in the if statement check memory usage
2022.01.13 04:12 AM - edited 2022.01.13 06:56 AM
Is there a reason you cannot use -g 1 ?
Running .Q.gc[] so often is not the best approach but if you needed to a timer could check and run if after .z.pg for you:
runGC:0b
.z.pg:{ bigresult: value x;runGC::1b; bigresult };
.z.ts:{if[runGC;.Q.gc[];runGC::0b]}
\t 1
https://code.kx.com/q/ref/dotz/#zts-timer
To run it less often you could set a threshold and in the if statement check memory usage
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.