Patent ID: 7630958

Claim:
An apparatus comprising: at least one processor; a memory coupled with the at least one processor; and a program code residing in memory and executed by the at least one processor, the program code configured to: generate an access plan for a query using a cost-based optimizer; subsequent to generation of the access plan by the cost-based optimizer, receive one or more user preferences relating to the access plan, wherein the one or more user preferences are separate from the query and received from a user subsequent to generation of the access plan; associate the one or more preferences with the access plan; store the access plan and the associated one or more user preferences such that the access plan may be modified prior to execution by applying the one or more user preferences to the access plan; execute the access plan to generate a result set and apply the one or more user preferences to the access plan to modify the access plan prior to execution such that the modified access plan is executed; and, wherein the one or more user preferences include an identification of an initialization file specific to the access plan, and wherein the program code is configured to apply the one or more user preferences to the access plan by forcing the initialization file to be used during execution of the access plan in lieu of a default initialization file.