Showing results for 
Search instead for 
Did you mean: 

RE: [personal kdb+] peach type error

New Contributor
X-Originating-IP: Workspace Webmail 5.15.9Message-Id: <>From: "David Demner \(AquaQ\)" To: personal-kdbplus@googlegroups.comSubject: RE: [personal kdb+] peach type errorDate: Mon, 31 Aug 2015 11:06:50 -0700Mime-Version: 1.0

Sockets/handles with peach

A handle must not be used concurrently between threads as there is no locking around a socket descriptor, and the bytes being read/written from/to the socket will be garbage (due to message interleaving) and most likely result in a crash. Since v3.0, a socket can be used from the main thread only, or if you use the single shot sync request syntax as
q)`:localhost:5000 "2+2"

peach forms the basis for a multithreaded hdb, for illustration purposes considering the following query

{select max price by date,sym from trade where date=d} peach date
this would execute a query for each date in parallel. The multithreaded hdb with par.txt hides the complexity of splitting the query up between threads and aggregating the results.

-------- Original Message --------
Subject: [personal kdb+] peach type error
From: Roni Hoffman <>
Date: Mon, August 31, 2015 11:03 am
To: Kdb+ Personal Developers <>


Wondering if someone can tell me whats wrong with this.  I have 2 slaves

this works

{ (neg .z.w)  [((count x) ; x)] } each (100000 cut (select from trade where date=2015.07.23, sym in `AAPL`GOOG))

but this gives a type error

{ (neg .z.w)  [((count x) ; x)] } peach (100000 cut (select from trade where date=2015.07.23, sym in `AAPL`GOOG))

other peach queries work

You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

New Contributor III
Right, ok I see, thanks.