Radhika Pothukuchi
11/02/2025, 8:18 PMSamuel Friedman
11/03/2025, 12:01 AMSUBMIT TASK cache_important_table
SCHEDULE EVERY(INTERVAL 1 HOUR) AS
CACHE SELECT *
FROM dbname.important_table
PROPERTIES("verbose"="true");
One table we cache has 100mn rows x 55 columns. This isn’t very ‘big’ and it’s no problem to cache the entire thing. I think our cache for that table is less than 15gb (on each CN). Aggregates and spot queries are very fast when cached. Like 0.1 seconds.
(2) Use bloom_filter_columns
We also use the bloom_filter_columns property on columns that need sub-second spot query results but have high cardinality:
CREATE TABLE
...
PROPERTIES (
"replication_num" = "3",
"enable_persistent_index" = "true",
"compression" = "LZ4",
"bloom_filter_columns" = "parent_id, email, _record_lookup_concat, order_date"
);
(3) Use EXPLAIN ANALYZE with Claude/GPT
When a query isn’t performant, we’ve run EXPLAIN ANALYZE and fed the results to an LLM. The output from EXPLAIN is fairly readable, but it can feel intimidating after a long day- so- ChatGPT 5 has been very effective at translating the EXPLAIN output and recommending concrete actions, such as:
(4) Watch out for data type mis-matches in WHERE/JOIN conditions
Starrocks is lenient when you say something like:
WHERE order_date = '2025-11-02'
the above work fine. But SR will perform much better if you do
WHERE order_date = CAST('2025-11-02' AS date)
(5) Network latency matters
We’ve found it’s important for our realtime application(s) to sit “next to” starrocks. For instance, even though we had a Web application in AWS us-east-1… and Starrocks in us-east-1… they were in different VPCs. Between the VPCs was still something like 250-300ms in latency. We cut that to effectively zero with a direct route between the VPCs. (Or put SR in the same VPC as your app.)
Question RE caching for you:
For the lookups you need to feel ‘real time’, what’s the biggest table and how many rows x columns does it have? And about how many records are added daily?Radhika Pothukuchi
11/03/2025, 6:07 AMSamuel Friedman
11/03/2025, 3:50 PMCACHE keyword in front of it - and schedule it if you like.