1. A method comprising: analyzing a query that is submitted to a database so as to determine a join order restriction that is associated with a join between two tables of a plurality of tables of the database that participate in the query, the join order restriction constraining its associated join to be executed prior to another join of the query; generating at least one join plan that is constrained by the join order restriction, different join plans of said at least one join plan including different join orders; and selecting a join plan from among said at least one join plan for execution of the query.