An optimizer framework to produce the dynamic plans. The request submitted is fragmented into smaller pieces based on the definition, reliability of cardinality, and cost estimates. The smaller fragments of the request are planned and executed incrementally. The results from the smaller plan fragments are provided as feedback to the planning of the subsequent request fragments, thus generating a more optimal plan.