1. A computer program product comprising a machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising: receiving a query execution plan describing a query for accessing data and comprising a procedural pattern; matching the procedural pattern to a stored pattern for which an equivalent declarative operator has been pre-defined; generating a hybrid execution plan, the generating comprising replacing the procedural pattern with the equivalent declarative operator; assigning a hybrid execution plan processing cost to execution of the hybrid execution plan and a query execution plan processing cost to execution of the query execution plan, the assigning comprising evaluating a cost model for the hybrid execution plan and the query execution plan; and executing the query using the hybrid execution plan if the hybrid execution plan processing cost is less than the query execution plan processing cost or the query execution plan if the hybrid execution plan processing cost is greater than the query execution plan processing cost.