Hello,
I need to optimize Kdb group queries to reduce their total execution time. I am executing a group query using ‘by’ clause over 4 columns. The group query itself runs over a subquery.
The subquery returns around 6 million records and it runs in approximately 700 ms. The group query that runs on top of it reduces these records to around 3-4k, but it takes almost 4000 ms (4 seconds) to run which is beyond the acceptable limit of the application. I need to optimize it so that the total query execution time is less than 1.5 seconds. Is there any performant alternative to ‘by’ clause? Is there something I can do with the grouped columns that will improve the execution time?