Temporal online analytical processing (OLAP) analyzes past states of data whose values change over time. Such histories are naturally stored as interval histories, in which each row records the period during which a value remained valid. Because temporal analyses typically arrive in infrequent, intermittent bursts, serverless execution that launches functions only at query time offers a cost advantage over always-on clusters. Splitting a computation that a single process performs as a whole across independent serverless functions, however, breaks correctness in two ways. A function may not receive the rows that determine the state of its time range, and naively summing partial results yields incorrect answers for duration-weighted and cumulative-threshold queries. Existing SQL engines and serverless analytics do not address both problems together. This paper presents Vivace, a serverless system for exact temporal OLAP over interval histories. Vivace resolves the two problems in separate stages. Before any query arrives, a pre-query layout step partitions the interval history, replicating boundary-crossing intervals so each function computes its range completely from a single file. At query time, a merge step combines partial results under operator-specific rules. Associative aggregates merge intermediate values, and ranking re-orders candidates within each time range. We prove that this partitioned execution matches single-process computation up to canonical form. Evaluated on AWS Lambda with real-world datasets, Vivace reduces latency and monetary cost by up to 82% and 84%, respectively, against an equivalent SQL baseline that queries the history directly, demonstrating robust generality and efficiency.
翻译:时序联机分析处理(OLAP)分析的是值随时间变化的数据的过去状态。此类历史数据通常以区间历史形式存储,其中每一行记录某个值保持有效的时间段。由于时序分析通常以低频、间歇性突发方式执行,相比持续运行的集群,仅在查询时启动函数的无服务器执行方式具有成本优势。然而,将单个进程整体执行的计算拆分为独立无服务器函数执行时,会在两个方面破坏正确性:函数可能无法获取决定其时间范围内状态的记录行,而简单累加部分结果会导致持续加权查询和累计阈值查询得出错误答案。现有SQL引擎和无服务器分析系统未能同时解决这两个问题。本文提出Vivace——一种针对区间历史进行精确时序OLAP的无服务器系统。Vivace分两个阶段解决上述问题:在查询到达前,通过查询前布局步骤对区间历史进行分区,复制跨边界区间以确保每个函数从单一文件中完整计算其范围;在查询时,通过归并步骤按算子特定规则组合部分结果——结合性聚合函数归并中间值,排序函数则在各时间范围内重新排列候选值。我们证明该分区执行的计算结果与单进程计算在规范形式上等价。在AWS Lambda上使用真实数据集的评估表明,与直接查询历史数据的等效SQL基准方案相比,Vivace将延迟和货币成本分别降低高达82%和84%,展现出鲁棒的一般性与高效性。