Skip to content

RonSQL#

RonSQL supports pushdown aggregation of queries on a single table. The reason for developing this support is that AI inferencing is often built on features that constitute aggregates of many events. These aggregates are often calculated by offline systems that goes through historical data.

However real-time AI inferencing requires the features to be calculated on the current events as well as historical events. Thus RonDB supports storing event data in time windows, using RonSQL to calculate aggregates based on data in those tables and getting rid of this data when it is too old using the TTL feature.

To benchmark this we used a very simple benchmark consisting of 1 query in TPC-H. Q1 in iTPC-H does a scan on all rows in the lineitem table. There are about 6M rows per scale factor in this table. Using the MySQL server this query requires most of this table to be sent up to the MySQL server to calculate the aggregates there. This takes about 1 second with scale factor 1.

With RonSQL the calculation happens where the data resides and it happens on all partitions in parallel. This means that in a standard setup with 6 partitions we can handle this query 10x faster in 100 ms. By doubling the number of partitions we can improve this to 20x improvement and this query can execute in 50ms instead.