15. A volatile or non-volatile computer readable medium storing a computer program of instructions which, when executed by a processing system, cause the system to perform a 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; 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; 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.
15. A volatile or non-volatile computer readable medium storing a computer program of instructions which, when executed by a processing system, cause the system to perform a 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; 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; 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. 20. The medium of claim 15 , wherein the computer program, when executed, further performs the method comprising: associating the one or more tuning hints with a plurality of query language statements.