.NET kdb+ datareader

Hi group,

I am trying to achieve best as possible data transfert performance from kdb+ to C# application. I tried all possible way, qODBC, qSharp, c.cs from kx but I have no impressive result yet!

What I mean by that:

q)meta table

c             | t f a

--------------| -----

stock_id      | i   g

time          | t   s

last          | f

last_size     | i

total_volume  | i

bid           | f

ask           | f

basis_for_last| c

q)select count i from table where stock_id = 926

x


218471

q)\t select from table where stock_id = 926

13

The result takes 13ms on kdb+ console but ~200ms with c.cs. This is alot of overhead for the socket and I got the same result with an SQL Server on disk only.

Any tips?

Have you isolated the socket overhead vs network? If you have a slow network speed your *.cs work is micro optimisation.

using localhost
kdb+ -> kdb+/c api for such a resultset is ~5-10mS.
kdb+ -> c#, it’s >200mS.

c.cs uses techniques found in other drivers - please let us know if you find better ways to do this. e.g. decoding floats seems particularly expensive.

There was a recent thread on c# performance; maybe that helps you.