Patent ID: 9348867
Filing Date: 2016-05-24
CPC Classification: G06F

Claim Text:
1. A computer-implemented method for using multiple plans in a database management system to access current data and history data, the method comprising: building, by a computer, a first access plan for a query, wherein the first access plan is an integral part of a bound form of a statement and specifies an order of operations for accessing data; storing, by the computer, the first access plan as a first section in an application package, wherein the first section is for accessing a regular table and a system temporal table; determining, by the computer, whether a bind option for the query is detected; in response to determining that the bind option is detected, building, by the computer, a second access plan for the query, wherein the second access plan includes UNION ALL; storing, by the computer, the second access plan as a second section in the application package, wherein the second section is for accessing the regular table and the system temporal table, and a history table; loading, by the computer, the application package; loading and executing, by the computer, the first section, in response to determining that a register CURRENT TEMPORAL SYSTEM_TIME is not set; and loading and executing, by the computer, the second section, in response to determining that the register CURRENT TEMPORAL SYSTEM_TIME is set to a valid time stamp.