8. An apparatus, comprising: at least a processor configured for performing: associating a query language statement with a query profile; determining a query block for a 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; associating one or more tuning hints with the query block; 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; resolving an unresolved hint in conflict with another tuning hint, wherein; the part of the rewritten query language statement is not the entire rewritten query language statement; and a computer readable storage medium or a computer readable storage device configured for storing the unresolved hint in a hint data structure.
8. An apparatus, comprising: at least a processor configured for performing: associating a query language statement with a query profile; determining a query block for a 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; associating one or more tuning hints with the query block; 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; resolving an unresolved hint in conflict with another tuning hint, wherein; the part of the rewritten query language statement is not the entire rewritten query language statement; and a computer readable storage medium or a computer readable storage device configured for storing the unresolved hint in a hint data structure. 9. The apparatus of claim 8 , in which the processor is further configured for performing: transforming the query block from a parent block into a child block during compilation of the statement.