1. A computer implemented method, comprising: associating a query language statement with a query profile; determining a query block for the query language statement, wherein the query block is a part of a rewritten query language statement for optimization and is generated or transformed from one or more other query blocks during compilation of the query language statement to become a part of the query language statement, and the act of determining the query block is performed by a processor; associating one or more tuning hints with the query block; resolving an unresolved hint in conflict with another tuning hint, wherein the unresolved hint is stored in a hint data structure on a tangible computer readable storage medium or a computer storage device; and storing the one or more tuning hints for the query block, wherein at least one of the one or more tuning hints associated with the query block is retrieved for and applied to the query block during the compilation of the query language statement, and the part of the rewritten query language statement is not the entire rewritten query language statement.