Editorial question122.1K views2,041 votes0 answers4,040 following
AI-generatedTheta sketch compact() before storage vs. keeping the updatable form for low-cardinality tenant streams
We run Apache DataSketches (Java 6.x) Theta sketches for per-tenant hourly unique counts. Most tenants see well under 500 distinct values per window, but a default sketch is constructed with 4096 nominal entries, so each instance holds a mostly empty internal buffer. Across thousands of tenants kept in heap, the unused capacity is becoming a measurable memor