Flashback support for domain index queries

Information

  • Patent Application
  • 20070198615
  • Publication Number
    20070198615
  • Date Filed
    October 05, 2006
    17 years ago
  • Date Published
    August 23, 2007
    17 years ago
Abstract
Techniques for executing flashback queries using domain indexes in a database system are provided. In one technique, a flashback parameter of the flashback query is not included in a call-out invocation of domain index routines that implement a domain index. A call-back query execution unit nonetheless retrieves, for call-back queries issued by the domain index routines, call-back query results that reflect the state of a database in the database system as of the time specified in the flashback parameter. In another technique, a call-out invocation of domain index routines includes the flashback parameter of a flashback query. The domain index routines issue call-back queries that require the retrieval of data which reflects the state of a database as of the time specified in the flashback parameter, which are executed by the call-back query execution unit.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:



FIG. 1 is a block diagram illustrating the interactions and relationships between different components of a database system according to an embodiment of the present invention;



FIG. 2 is a flow diagram that illustrates the processing of flashback queries without passing flashback parameters to the domain index routines for the domain index, according to an embodiment of the invention;



FIG. 3 is a flow diagram that illustrates the processing of flashback queries with the passing of flashback parameters to the routines of the domain index, according to an embodiment of invention;



FIG. 4 is a block diagram that illustrates a computer system 400 upon which an embodiment of the invention may be implemented; and



FIG. 5 illustrates a database table at a current time and from a prior time.


Claims
  • 1. A method of retrieving data from a prior target logical state of a database system, the method comprising the steps of: receiving a request to retrieve said data from said prior target logical state of said database system, where the prior target logical state corresponds to a target time; andin response to said request, using an index structure that is not natively supported by said database system to retrieve said data, where said data that is retrieved using said index structure accurately reflects said prior target logical state of said database system.
  • 2. The method of claim 1, wherein the method further includes registering with the database system user-implemented routines for using the index structure.
  • 3. The method of claim 2, further including: in response to receiving said request, storing target time data that indicates said prior target logical state;wherein the step of using an index structure includes making a call to at least one of said user-implemented routines without passing any information identifying said target point in time;in response to said call, receiving from at least one of said user-implemented routines one or more queries; andusing the target time data to execute the one or more queries to retrieve further data that reflects said prior target logical state.
  • 4. The method of claim 3, wherein: the method further includes storing the stored target time data in a variable;the step of using the target time to execute the one or more queries is performed by a call-back execution unit; andthe call-back execution unit obtains said stored target time data from said variable.
  • 5. The method of claim 3, wherein the step of using the target time data to execute the one or more queries further comprises the step of rewriting said one or more queries to retrieve said further data that reflects said prior target logical state of said database system.
  • 6. The method of claim 2, wherein using the index structure includes: making a call to at least one of said user-implemented routines, wherein said call passes information identifying said target time;in response to said call, receiving from at least one of said user-implemented routines (a) one or more queries that request retrieval of data, and (b) data that reflects said target time.
  • 7. The method of claim 6, further comprising the step of executing the one or more queries to retrieve further data that reflects said target logical state of said database system.
  • 8. A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 1.
  • 9. A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 2.
  • 10. A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 3.
  • 11. A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 4.
  • 12. A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 5.
  • 13. A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 6.
  • 14. A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 7.