Patent attributes
A database engine receives a query batch of database queries from a client. The database engine identifies one or more object model queries from the query batch. Each object model query includes an outer-most outer-join that joins a respective dimension subquery and respective aggregated measure subqueries. The database engine forms a plurality of candidate subqueries by peeling off the respective outer-most outer-join for each of the object model queries. The database engine then fuses at least some of the plurality of candidate subqueries to form a set of optimized subqueries. The set of optimized subqueries has fewer subqueries than the plurality of candidate queries. The database engine also forms an optimized execution plan based on the set of one or more optimized subqueries. The database engine subsequently obtains a result set from the database based on the optimized execution plan, and returns the result set to the client.