1. A computer implemented method for performing a query on a relational database, the computer implemented method comprising: receiving, by a computer, a query; determining, by the computer, a corresponding complexity class of a plurality of complexity classes for the query by determining a static complexity class for the query and by determining dynamic complexity classes for the query; decomposing the query into sub queries; devising a query execution plan using the dynamic complexity classes determined and algorithms available to a plurality of query processors; routing, by the computer, the decomposed query to corresponding query processors of the plurality of query processors based on the corresponding complexity class determined for the received query; and executing, by the computer, the decomposed query on the corresponding query processors according to a devised execution plan.