why q did not use the slave thread when we consider all symbol in

q)\s

4i

q).z.k

2014.10.04

q).z.K

3.2

q)meta gtrade

c    | t f a

-----| -----

sym  | s   g

price| f    

size | j    

q)\ts select size wavg price by sym from gtrade

671 242224288

q)\ts select size wavg price by sym from gtrade where sym in exec distinct sym from trade

199 67110272

q)(select size wavg price by sym from gtrade)~select size wavg price by sym from gtrade where sym in exec distinct sym from trade

1b

Is that a common query, with no other constraints?

hi Charlie,

Yes, it seems kdb+ only use the slaves when within is used for the grouped symbol.

Why in this general case of select size wavg price by sym from gtrade , it doesn’t optimize it to use slave?

it doesn’t detect that scenario as we didn’t consider that unconstrained case as a very likely common use case (for 64bit systems).