arXiv:2609.05014cs.DBSep 2026

Manuscript Offprint

arXiv:2609.05014

Reducing the Cross-Model Tax: Query Optimization over Multi-Model Data

Jáchym Bártík, Filip Štrobl, Irena Holubová

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Querying across heterogeneous data models incurs substantial overhead from query decomposition, data transfer, and processing outside the underlying database systems. We show that, in the evaluated decomposition-based architecture, a substantial part of this cross-model tax is not inherent to heterogeneity itself, but results from avoidable decisions made by the unifying query processor.

We present a mapping- and capability-aware optimization approach that systematically moves processing closer to the data. It combines model-aware predicate pushdown, cross-model dependent joins, and non-redundant query-part construction within a unified optimization pipeline applicable across relational, document, and graph databases.

The approach is implemented in MM-quecat and evaluated over PostgreSQL, MongoDB, Neo4j, and their heterogeneous combination. It reduces query latency by up to two orders of magnitude, eliminates all out-of-memory failures observed in the original single-DBMS experiments, provides further order-of-magnitude improvements through dependent execution, and reduces planning time for complex graph plans from hundreds of milliseconds to several milliseconds. The results demonstrate that established optimization principles can be generalized across data-model and system boundaries and can substantially improve the efficiency and robustness of decomposition-based multi-model query processing.

Keywords: multi-model databases, query optimization, query execution plans, predicate pushdown, dependent joins, heterogeneous databases

*Corresponding author

1. Introduction

Modern applications increasingly combine data with structurally distinct properties. Transactional records are naturally represented in relational tables, aggregate-oriented data in documents, and highly connected data in graphs. Multi-model data management addresses this heterogeneity by providing a common interface across multiple data models, either within a single database system or through a unifying layer over multiple specialized database management systems (DBMSs). Many widely used DBMSs have consequently extended their original models with support for additional representations [28]. At the same time, the rapid practical adoption of multi-model data management has outpaced the development of equally mature foundations and query-processing methods for heterogeneous querying [16, 6, 15].

A unified interface simplifies access to heterogeneous data, but it does not remove the differences between their physical representations, query languages, and execution capabilities. A query spanning several models may have to be decomposed into model-specific parts, translated into different native query languages, executed by different DBMSs, and completed by transferring, converting, joining, and restructuring intermediate results outside the underlying systems. This architecture resembles distributed and federated query processing, where performance depends not only on the cost of native query execution, but also on operator placement, data transfer, and the size of intermediate results crossing source boundaries [7, 10]. We refer to the additional overhead introduced by these operations as the cross-model tax.

The cross-model tax can become the dominant cost of query processing and can determine whether a query remains practically executable. When filters are evaluated only after data retrieval, irrelevant records must still be transferred, converted, and processed. Joins executed over independently retrieved inputs may materialize large intermediate results even when one input could substantially restrict the other. Query planning may also repeatedly explore different construction paths that lead to the same physical combination of data sources. These costs are amplified in a multi-model environment because the unifying processor must coordinate several native execution engines, translate between representations, and complete all op-erations that could not be delegated. In such cases, the main bottleneck is not the execution of native database queries themselves, but the way the multi-model processor decomposes, coordinates, and post-processes them.

Previous development of multi-model query processors, including MM-quecat, has primarily focused on functional expressiveness: which heterogeneous query constructs can be represented, translated, and executed correctly. Functional coverage is necessary, but it is not sufficient for practical query processing. A query processor may support a broad range of constructs while still retrieving unnecessarily large data volumes, exhausting available memory, or spending substantial time constructing equivalent plans. Efficient multi-model querying therefore requires not only a common language and a unified schema, but also optimization mechanisms that understand how conceptual query operations are mapped to heterogeneous physical representations and how much processing can be delegated to the underlying systems.

Established database optimization techniques offer possible solutions. Predicate pushdown reduces intermediate results by moving filtering closer to the stored data [7, 10]. Dependent joins use values obtained from one query branch to restrict another before its data are retrieved; related variants are also known as bind joins, D-joins, lateral joins, or tuple-substitution joins [7, 5]. Restricting plan exploration similarly reduces planning overhead when several construction paths are provably redundant. These principles are well understood in relational and distributed database systems, but their adaptation to a general multi-model environment is not direct. The optimizer must operate on a representation independent of the physical data models, reason about mappings to heterogeneous DBMSs, identify which conceptual values are physically available in each query part, and preserve query semantics across both model and system boundaries while accounting for differences in native capabilities.

This paper investigates how these principles can be generalized to decomposition-based multi-model query processing. We address three major sources of avoidable overhead: late predicate evaluation, independent retrieval of cross-model join inputs, and redundant exploration during query-part construction. The proposed approach moves applicable predicates into native queries, introduces execution dependencies between query branches, and adds mandatory kind patterns without exploring their permutations. Lightweight query-driven cardinality estimates support the orientation of dependent joins but do not constitute a separate full-cost model. These techniques are not presented as isolated implementation improvements. They form a mapping-and capability-aware optimization pipeline that connects transformations over a unified conceptual query plan with physical mapping coverage, native execution capabilities, and the remaining cost of processing in the unifying layer.

The main methodological contribution is the lifting of established optimization principles from homogeneous execution environments to plans crossing both data-model and DBMS boundaries. A conceptual predicate can be pushed only if the selected mapping provides all required values and the corresponding native query builder supports the complete condition. A dependent restriction may originate in one physical model, propagate through model-independent plan operators, and be consumed by a query part executed in another DBMS and translated into another native language. The optimization of query-part construction must preserve genuinely different physical alternatives while eliminating only construction paths that are provably equivalent. The resulting pipeline jointly considers conceptual semantics, physical mappings, and executable native operations instead of treating these levels independently.

We implement and evaluate the approach in MM-quecat [14], the query-processing component of the category-theory-based MM-cat [11] framework. MM-quecat evaluates queries expressed in the Multi-Model Query Language (MMQL) over a unified conceptual schema and mappings to relational, document, and graph databases. Its architecture separates conceptual query processing, mapping selection, native query generation, execution in the underlying DBMSs, and processing in the unifying layer. It therefore provides a suitable experimental setting for investigating optimization decisions that arise in decomposition-based multi-model systems. The proposed techniques are implemented for PostgreSQL, MongoDB, and Neo4j, covering relational, document, and graph representations as well as their heterogeneous combination.

The main contributions of this paper are as follows:

  1. We introduce a unified, mapping- and capability-aware optimization view of decomposition-based multi-model query processing that links conceptual operators, physical mappings, native execution capabilities, and unifying-layer costs. Within this view, we identify three major sources of avoidable cross-model overhead: late predicate evaluation, independent retrieval of join inputs, and redundant query-part con-struction.

  2. We introduce model-aware predicate pushdown that moves applicable filters from the unifying layer into native queries over relational, document, and graph data. The method combines model-independent QEP transformations with mapping-coverage and native-capability checks, allowing one optimization mechanism to operate across heterogeneous representations.

  3. We adapt dependent joins to multi-model query execution plans, allowing the result of one plan branch to restrict another branch across database and data-model boundaries before its data are retrieved. The dependent input may be an arbitrary subtree rather than a single data-source leaf, and lightweight query-driven cardinality estimates are used to select the independent input.

  4. We introduce and evaluate a non-redundant query-part construction method that identifies mandatory kind patterns and adds them jointly without exploring their equivalent insertion orders. The method reduces planning overhead while preserving all distinct physical alternatives.

  5. We implement the complete optimization pipeline in MM-quecat and experimentally evaluate it across relational, document, graph, and heterogeneous deployments. The evaluation demonstrates substantial reductions in execution and planning overhead, elimination of all out-of-memory failures observed in the original single-DBMS experiments, and improved robustness for queries producing large intermediate results.

The results indicate that, in the evaluated architecture, a substantial part of the cross-model tax is not inherent to querying heterogeneous data. It results from avoidable decisions about operator placement, unrestricted intermediate-result retrieval, and physical query-part construction. Predicate pushdown reduces latency by up to two orders of magnitude and eliminates all out-of-memory failures observed in the original single-DBMS experiments, dependent execution provides additional improvements of up to one order of magnitude, and non-redundant construction reduces planning time for the largest evaluated graph plans from almost 600 milliseconds to several milliseconds. These results show that established optimization principles can be systematically generalized across data-model and system boundaries when conceptual semantics, physical mappings, and native execution capabilities are considered jointly.

More generally, the proposed approach changes the role of the unifying layer. Instead of retrieving complete native results and performing most processing centrally, the unifying processor actively coordinates the capabilities of the underlying DBMSs and retains only operations that cannot be executed closer to the data. This does not remove the unavoidable cost of heterogeneity, but it substantially reduces the part caused by the query processor itself. The presented techniques therefore provide not only optimizations of MM-quecat, but also a reusable direction for the design of decomposition-based multi-model and heterogeneous query processors.

The remainder of the paper is organized as follows. Section 2 introduces the multi-model query-processing model and the concepts required by the proposed techniques. Section 3 presents the sources of cross-model overhead and the corresponding optimization methods. Section 4 summarizes their implementation in MM-quecat. Section 5 reports the experimental evaluation and discusses threats to validity. Section 6 reviews related work, and Section 7 concludes the paper.