Is StarRocks an OLAP or OLTP database?

StarRocks was designed as an OLAP which means it was designed to answer analytical queries. While it’s true that it has some features like primary key table, which are a common feature in OLTP systems, StarRocks’ primary key table was implemented to better support real time streaming inserts and upserts OLAP use cases. StarRocks was not designed to execute large volume inserts/upserts in the 10 to 30ms range that are common in OLTP.

Characteristic OLTP OLAP (AWS Redshift) OLAP (Snowflake GCP Big Query) OLAP (StarRocks)
Query complexity Simple Complex Complex Complex
Purpose Transaction processing Data analysis Data analysis Data analysis
Performance requirements High throughput, low latency High throughput, high latency High throughput, high latency High throughput, high latency
Data model Relational Multidimensional Multidimensional Multidimensional
Typical workload Insert, update, delete Select, aggregate, group by Select, aggregate, group by Select, aggregate, group by
Deployment Architecture Compute with attached storage Separated compute and storage architecture Separated compute and storage architecture
ACID Commit or rollback on a record level Commit or rollback on a batch level
Comments Support JOIN queries in normalized and denormalized data, ACID ingestion, mysql wire protocol emulation, Data warehouse with local disk or Data Warehouse on top of data lake (S3 with Apache Iceberg, Apache Hudi, Apache Hive or Delta Lake), mutable data support (update, upsert, delete) through the primary key table, immutable data support through aggregate or duplicate key table

Also sub-second and second OLAP IS NOT an OLTP; it’s just a faster OLAP. Sub-second and second OLAP are not optimized for single record inserts however they can deal with streaming inserts and upserts through micro batching (eg. commit x number of records every 5 seconds). If done correctly, from the initial insertion of the kafka (can use others) record and making it queryable in a sql query to StarRocks is in mid to high single digit seconds (~5 to 9 seconds).