Patent attributes
Various examples are directed to systems and methods optimizing database queries. A database management system may receive a first query comprising a plurality of query expressions. The database management system may determine that a first expression of the first query is nullable and that the first expression is null preserving. The database management system may generate optimized query code for the first query. The optimized query code may comprise a first code segment and a conditional jump instruction. The first code segment that, when executed by a processor, may cause the processor to perform operations comprising determining a value of the first expression. The conditional jump instruction may, when executed by the processor, cause the processor to perform operations comprising: skipping execution of at least a portion of the first code segment and returning null for the first expression.