CURSOR PRE-FETCHING
[0001] The present application is related to the following U.S. patent application Ser. No. 10/917,953, Transparent Session Migration Across Servers (Attorney Docket No. 50277-2383), filed by Sanjay Kaluskar, et al. on Aug. 12, 2004 and incorporated herein by reference.
FIELD OF THE INVENTION
[0002] The present invention relates to fetching of cursor result sets, and particular, to performing such fetching more efficiently.
BACKGROUND OF THE INVENTION
[0003] Many enterprise data processing systems rely on multi-node database servers to store and manage data. Such enterprise data processing systems typically follow a multitier model that has a multi-node database server in the first tier, and one or more computers in the middle tier and outer tiers.
[0004] FIG. 1 depicts multi-node database server mdsll, which is implemented on multi-tier architecture 10. A server, such as multi-node database server mdsll, is a combination of integrated software components and an allocation of computational resources, such as memory, a node, and processes on the node for executing the integrated software components on a processor, the combination of the software and computational resources being dedicated to performing a particular function on behalf of one or more clients. Resources from multiple nodes in a multi-node computer system can be allocated to run a particular server's software. A particular combination of the software on a node and the allocation of the resources from the node is a server that is referred to herein as a server instance or instance. Thus, a multi-node server comprises multiple server instances that can run on multiple nodes. Several instances of a multi-node server can even run on the same node.
[0005] A database server governs and facilitates access to a particular database, processing requests by clients to access the database. A multi-node database server, such as multi-node database server mdsll, comprises multiple "database instances", each database instance running on a node. Multi-node database server mdsll governs access to database dbll. Amulti-node database server can govern and facilitate access to one or more databases.
[0006] The middle-tier of multi-tier architecture 10 includes middle-tier computer cmpll and the outer-tier includes user computer cmpl2. User computer cmpl2 executes browser brll, which interacts with an end-user. The end-user's interaction with browser brll causes the browser to transmit requests over a network, such as the Internet, to middle-tier computer cmpll. The request causes a process on middle-tier computer cmpll, client clll, to execute application applll. Execution of application applll by the client clll causes client clll to connect to multi-node database server mdsll. For example, application applll may be an order entry application that is configured to receive order requests from browser brll. Data for the order entry application is stored in dbll. To process the requests, execution of application applll by client clll causes client clll to connect to database dbll. Once connected, client clll issues database statements to retrieve and manipulate data stored in database dbll.
[0007] The tier that directly connects to a server, relative to other tiers in a multi-tier architecture, is referred to herein as containing the client of the server. Thus, client process clll is referred to herein as the client of multi-node database server mdsll.
[0008] An application, as the term is used herein, is a unit of software that is configured to interact with and use the functions of a server. In general, applications are comprised of integrated functions and software modules (e.g. programs comprised of machine executable code or interpretable code, dynamically linked libraries) that perform a set of related functions.
[0009] An application, such application applll, interacts with a multi-node database server mdsll via client-side interface component intcompll. Execution of application applll causes client clll to execute client-side interface component intcompll to interact with multi-node database server mdsll. Application applll includes invocations of routines (e.g. functions, procedures, object methods, remote procedures) of client-side interface component intcompll. Applications are typically developed by vendors and development teams different from those that develop servers and interfaces to servers, such as multi-node database server mdsll and client-side interface component intcompll.
[0010] In order for a client to interact with multi-node database server mdsll, a session is established for the client on a database instance of multi-node database server mdsll. A session, such as a database session, is a particular connection established for a client to a server, such as a database instance, through which the client issues a series of requests (e.g., requests for execution of database statements).
[0011] For each database session established on a database instance, session state is maintained for the session. Session state includes the data stored for a database session for the duration of the database session. Such data includes, for example, the identity of the client for which the session is established, and temporary variable values generated by processes and database components executing software within the database session. A database component is a set of software modules that provide specialized and related functions for a database server, and shall be described later in greater detail. An example of a database component is a Java execution engine.
[0012] The beginning and end of a session demarcates a unit of work. Often, the beginning of a database session corresponds to an end-user establishing an interactive session with an application via, for example, a browser, and ends when the end-user logs off. Thus, the beginning and ending of the database session depend on application logic and end-user action, and may not be controlled by a server on which the session is established.
Client-Side Interface Components
[0013] Client-side interface components, such as clientside interface component intcompll, are software components that reside and are executed on the same computer of a client of a server, and that are configured to provide an interface between the client and the server. The client-side interface component intcompll is configured for performing the detailed operations needed to interface with multi-node database server mdsll. For example, application applll invokes a function of client-side interface component