Presentation is loading. Please wait.

Presentation is loading. Please wait.

Arthur Whitney, Chief Technical Officer, KX Systems.

Similar presentations


Presentation on theme: "Arthur Whitney, Chief Technical Officer, KX Systems."— Presentation transcript:

1 Lots o' Ticks: real-time high performance queries on billions of quotes and trades
Arthur Whitney, Chief Technical Officer, KX Systems. Dennis Shasha, Courant Institute, New York University.

2 KSQL Model Replace Tables by Arrables (Array Tables).
Any set-oriented query is answered as in SQL. New queries are possible based on viewing columns in tables as arrays.

3 Demo Application: Stocks
10,000 securities from all the major markets. Entire quote and trade history. Production application holds 10 years of data, about 1/2 terabyte, on a Linux cluster of up to 100 processors. For demo: a few months on a single PC.

4 Example Query 1 Find the 5 tick moving averages of each stock per month. trade is ordered by date. select 5 avgs price by sym, date.month from trade “avgs” produces an array for each stock, month pair. In SQL, aggregates can produce only a scalar for each group by result.

5 Example Query 2 Find the 10 day delayed auto-correlation (a function defined in C) for each stock: select auto[10,price] by sym from trade User-defined functions can be defined in C and imported into the name space. They can produce arrays or scalars.

6 “Emotive” Queries http://kx.com/a/tdb/q.t
7 best stocks to buy and later sell. “7 first desc …(last price)/first price …” 7 worst hours for some stock. “7 first asc …” The best buy and later sale for some stock. “… max price - prefixmins price …”

7 Implementation Fully vertically partitioned to take advantage of cache lines and stride one behavior. Special algorithms for sorting. Very small footprint (< 0.3 megabytes)

8 Who Uses KDB Now? Mostly finance and telecommunications companies.
High value, large data. Response must be fast. Data interchange products, because XML is ordered as is KDB.

9 More Information Timeseries application at: http://kx.com/a/tdb
Realtime: 10 million trades and quotes per day(reuters triarch) at max rate of records per second. History: 10 billion trades and quotes. Free download of KDB at


Download ppt "Arthur Whitney, Chief Technical Officer, KX Systems."

Similar presentations


Ads by Google