-22!<my query result>
See http://code.kx.com/q/ref/internal/#-22x-uncompressed-length
سؤال
This is for a user interface to kdb, where a user can run arbitrary queries. I want to check the size of result and alert the user if it is likely to cause memory overflow on the client.
I can do
count -8!"my query result"
but I suspect that kdb will allocate a buffer to hold serialized content. Is there a way to avoid that?
Alternatively, is there a way to get memory size taken up by kdb object (internal representation), and would that be "close enough" to its serialized form?
المحلول
-22!<my query result>
See http://code.kx.com/q/ref/internal/#-22x-uncompressed-length