1. In a database system, a method for parallel optimization of a query, the method comprising: generating a plurality of parallel plans for obtaining data requested by the query, the parallel plans including parallel operators for executing portions of the query in parallel; adjusting parallel operators of each parallel plan based on maximum number of threads available for executing the query, wherein said maximum number of threads is user configurable; creating a schedule for each parallel plan indicating a sequence for execution of operators of each parallel plan, wherein the schedule is created based upon dependencies among operators of each parallel plan and resources available for executing the query and includes identifying pipelines of operators in each parallel plan based upon dependencies among operators of each parallel plan, determining resource usage of each pipeline and splitting a particular pipeline having resource usage greater than resources available for executing the particular pipeline into a plurality of pipelines by adding operators for performing operations in parallel so that resource usage is distributed over the plurality of pipelines; determining execution cost of each parallel plan based on its schedule; and returning a result of a particular parallel plan having lowest execution cost for obtaining data requested by the query.