# US 7,613,710 B2 · Suspending a result set and continuing from a suspended result set

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 7,613,710 B2
- Document ID: US7613710B2
- Status: Granted
- Kind: B2
- Application number: 11/097,422
- Filed: 2005-04-01
- Published: 2006-03-16
- Granted: 2009-11-03
- Earliest claimed: 2004-08-12
- Assignees: Oracle International Corporation
- Inventors: Mehul D. Bastawala; Lakshminarayanan Chidambaran; Sreenivas Gollapudi; Sanjay Kaluskar; Srinath Krishnaswamy; Debashish Chatterjee
- Web page: https://patentgrep.com/patent/US7613710B2

## CPC

- G06F 16/2438: {Embedded query languages}
- G06F 16/24561: {Intermediate data storage techniques for performance improvement}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system, method, computer program and system for suspending a result set and continuing from a suspended result set for a cursor is disclosed. The rows from a row source corresponding to the cursor result set are suspended into storage so that when a fetch is requested the data can be sent (continued) from the suspended storage and does not depend on the original cursor row source or session to be available.

## Claims

### Claim 1

A computer-implemented method of suspending a result set, the method comprising:
determining whether an original result set, access to which is maintained by a first cursor state on a side of a server and a second cursor state on a side of a client, is to be suspended by using a processor, wherein the original result set is generated in response to execution of a query;
suspending the original result set by storing a first set of data of the original result set in a storage area of a computer readable medium or a storage device, wherein the act of storing the first set of data comprises caching a first row of the first set of data into a first storage area;
flushing the first storage area into a second storage area, when any of a set of constraint values has been exceeded, and it is determined that the first storage area needed to be flushed, or that the first storage area is full; and
repeating the act of suspending the original result set until at least required data of the original result set has been sent to the storage area, wherein upon suspension of the result set,
the act of suspending the original result set allows the client to access, without re-issuing or re-executing the query, the at least required data or a same order of the at least required data of the original result set throughout a life of the second cursor state when the first cursor state is no longer available to the client.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, wherein the storage area is self describing.

### Claim 3 (depends on 2)

The computer implemented method of claim 2, wherein the self-describing storage area includes data detailing a data packing layout.

### Claim 4 (depends on 3)

The computer implemented method of claim 3, wherein the self describing storage uses versioned data packing layouts and data compression.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, wherein the storage area is not contiguous.

### Claim 6 (depends on 1)

The computer implemented method of claim 1, wherein the storage area is shareable across sessions or nodes.

### Claim 7 (depends on 6)

The computer implemented method of claim 6, wherein a second node has direct access to the suspended result set located in another node.

### Claim 8 (depends on 1)

The computer implemented method of claim 1, wherein the storage area is persistent storage, memory, or a combination of persistent storage and memory.

### Claim 9 (depends on 1)

The computer implemented method of claim 1, wherein the result set is a cursor result set.

### Claim 10 (depends on 1)

The computer implemented method of claim 1, wherein the method is reentrant.

### Claim 11 (depends on 1)

The computer implemented method of claim 1, wherein the required data include all or a subset of the result set.

### Claim 12 (depends on 1)

The computer implemented method of claim 1, further comprising updating a row mapping index.

### Claim 13 (depends on 1)

The computer implemented method of claim 1, further comprising:
checking if constraint values have been exceeded; and pausing the suspending, if the constraint values have been exceeded.

### Claim 14 (depends on 13)

The computer implemented method of claim 13, wherein the constraint values are based on one cursor or on a session.

### Claim 15 (depends on 13)

The computer implemented method of claim 13, wherein suspending the row is performed during an absolute time period added to an average row fetch time or as a percent delay to an average row fetch time.

### Claim 16 (depends on 13)

The computer implemented method of claim 13, wherein suspending the row comprises storing a set number of rows during a row fetch or storing a portion of a row during a row fetch, the portion set at runtime.

### Claim 17 (depends on 1)

The computer implemented method of claim 1, wherein the storing of the first set of data comprises storing a first row, the row comprising row bytes, the method comprising:
a) caching row bytes into a first storage area;
b) determining if the first storage area is full;
c) flushing the first storage area into a second storage area, if the first storage area is full;
d) determining whether any of a set of constraint values have been exceeded;
e) determining whether the entire row has been cached;
f) repeating a)-e) if the entire row has not been cached; and
g) flushing the first storage area into a second storage area, if any of the set of constraint values have been exceeded and it is determined that the first storage area needed to be flushed.

### Claim 18 (depends on 1)

The computer implemented method of claim 1, further comprising
simultaneously fetching a second set of data of the result set; and
repeating the fetching until all the requested data has been fetched.

### Claim 19

A computer implemented method of continuing a suspended result set, the method comprising:
determining whether a result set, access to which is maintained by both a first cursor state on a side of the server and a second cursor state on a side of the client, is suspended from an original row source to a storage location, wherein
the act of determining the result set is suspended is performed by a processor,
the result set is generated in response to execution of a query, and
the result set which is suspended from the original row source allows the client to access, without re-issuing or re-executing the query, required data or a same order of the required data of the original row source throughout a life of the second cursor state when the first cursor state is no longer available to the client;
determining a location of a subject row in the suspended result set in the storage location, wherein the suspended result set was suspended by one or more acts which comprise caching the subject row into a first storage area which comprises the location or a first location;
flushing the first storage area into a second storage area which comprises the location or a second location, when any of a set of constraint values has been exceeded, and it is determined that the first storage area needed to be flushed, or that the first storage area is full, wherein the first storage area is different from the second storage area;
resuming fetching the subject row from the location in the storage location; and
displaying a result of the act of resuming fetching the subject row on a display apparatus or storing the result in a tangible computer-readable medium or a storage device.

### Claim 20 (depends on 19)

The computer implemented method of claim 19, wherein suspending the result set and the act of fetching occur contemporaneously.

### Claim 21 (depends on 19)

The computer implemented method of claim 19, wherein suspending the result set and the act of fetching occur such that any row of the result set can be fetched in any order.

### Claim 22 (depends on 19)

The computer implemented method of claim 19, wherein the suspended result set is self-describing.

### Claim 23 (depends on 19)

The computer implemented method of claim 19, wherein the act of determining the location of a subject row comprises reading a location information of a row mapping index, the location information corresponding to the requested row and including an offset.

### Claim 24 (depends on 19)

The computer implemented method of claim 19, further comprises suspending the result set, wherein the act of suspending comprises:
storing a first row of the result set in a storage area; and
repeating the storing until the required rows have been suspended, the storage area being available after the result set is no loner available.

### Claim 25

A computer implemented method of continuing from a result set being suspended, the method comprising:
a) determining whether suspension of the result set, access to which is maintained by a first cursor state on a side of a server and a second cursor state on aside of a client is enabled, wherein the result set is generated in response to execution of a query, and the act of determining whether suspension of the result is performed by a processor;
b) determining if a subject row in the result set has been suspended;
c) determining if the subject row in the result set that is available with a first cursor and a second cursor is to be suspended, if the subject row has not been suspended;
d) suspending the subject row if it is determined that the subject row is to be suspended, wherein upon suspension of the subject row,
the suspended subject row in a storage area allows the client to access, without re-issuing or re-executing the query, required data or a same order of the required data of the subject row through a life of the second cursor state when the first cursor state is no longer available to the client, and
the act of suspending the subject row is performed during an absolute time period added to an average row fetch time or as a percent delay to an average row fetch time;
e) extracting and returning the subject row, from a suspended result set if the subject row has been suspended, or from the cursor row source if the row is not to be suspended;
f) repeating a)-f) until all the rows in the result set are processed, and
displaying a result of the act of suspending the subject row on a display apparatus or storing the result in a tangible computer readable medium or a storage device.

### Claim 26 (depends on 25)

The computer implemented method of claim 25, further comprising:
g) determining if the cursor should be closed if there are no more rows in the result set;
h) closing the cursor if it is determined that the cursor should be closed; and
i) waiting for a client call.

### Claim 27 (depends on 25)

The computer implemented method of claim 25, wherein the subject row is returned from the row source prior to suspending.

### Claim 28

A computer program product comprising a volatile or non-volatile computer usable storage medium having executable code which, when executed by a processor, causes the processor to execute a process for suspending a result set, the process comprising:
determining whether an original result set, access to which is maintained by a first cursor state on a side of a server and a second cursor state on a side of a client, is to be suspended using the processor, wherein the original result set is generated in response to execution of a query;
suspending the original result set by storing a first set of data of the original result set in a storage area of a computer readable medium or a storage device, wherein the act of storing the first set of data comprises caching a first row of the first set of data into a first storage area;
flushing the first storage are into a second storage area, when any of a set of constraint values has been exceeded, and it is determined that the first storage area needed to be flushed, or that the first storage are is full; and
repeating the act of suspending the original result set until at least the required data of the original result set has been sent to the storage area, wherein upon suspension of the result set,
the act of suspending the original result set allows the client to access, without re-issuing or re-executing the query, the at least required data or a same order of the at least required data of the original result set throughout a life of the second cursor state when the first cursor state is no longer available to the client.

### Claim 29 (depends on 28)

The computer program product of claim 28, further comprising continuing from the suspended result set.

### Claim 30

A computer program product comprising a computer usable medium having executable code which, when executed by a processor, causes the processor to execute a process for continuing from a result set being suspended, the process comprising:
a) determining whether the suspension of the result set, access to which is maintained by a first cursor state on a side of a server and a second cursor state on a side of a client, is enabled, wherein the result set is generated in response to execution of a query, and the act of determining whether suspension of the result is performed by the processor;
b) determining if a subject row in the result set has been suspended;
c) determining if the subject row in the result set that is available with a first cursor and a second cursor is to be suspended, if the subject row has not been suspended;
d) suspending the subject row if it is determined that the subject row is to be suspended, wherein upon suspension of the result set,
the result set suspended in a storage area allows the client to access, without re-issuing or re-executing the query, required data or a same order of the required data of the subject row through a life of the second cursor state when the first cursor state is no longer available to the client, and
the act of suspending the subject row is performed during an absolute time period added to an average row fetch time or as a percent delay to an average row fetch time;
e) extracting and retuning the subject row, from a suspended result set if the subject row has been suspended, or from the cursor row source if the row is not to be suspended;
f) repeating a)-f) until all the rows in the result set are processed, and
displaying a result of the act of suspending the subject row on a display apparatus or storing the result in a tangible computer readable medium or a storage device.

### Claim 31 (depends on 30)

The computer program of claim 30, wherein the subject row is returned from the row source prior to the suspending.

### Claim 32

A computer program product comprising a volatile or non-volatile computer usable medium having executable code, which when executed by a processor, causes the processor to execute a process for continuing a suspended result set, the process comprising:
determining whether a result set, access to which is maintained by both a first cursor state on a side of the server and a second cursor state on a side of the client, is suspended from an original row source to a storage location, wherein
the act of determining the result set is suspended is performed by the processor,
the result set is generated in response to execution of a query, and
the result set which is suspended from the original row source allows the client to access, without re-issuing or re-executing the query, required data or a same order of the required data of the original row source throughout a life of the second cursor state when the first cursor state is no longer available to the client;
determining a location of a subject row in the suspended result set in the storage location, wherein the suspended result set was suspended by one or more acts which comprise caching the subject row into a first storage area which comprises the location or a first location;
flushing the first storage area into a second storage area which comprises the location or a second location, when any of a set of constraint values has been exceeded, and it is determined that the first storage area needed to be flushed, or that the first storage area is full, wherein the first storage area is different from the second storage area;
resuming fetching the subject row from the location in the storage location; and
displaying a result of the act of resuming fetching the subject row on a display apparatus or storing the result in a tangible computer-readable medium or a storage device.

### Claim 33 (depends on 30)

The computer program product of claim 30, wherein the result set is self-describing.

### Claim 34 (depends on 30)

The computer program product of claim 30, wherein the result set is a cursor result set.

### Claim 35 (depends on 32)

The computer program product of claim 32, wherein the result set is self-describing.

### Claim 36 (depends on 32)

The computer program product of claim 32, wherein the result set is a cursor result set.

### Claim 37

A system for suspending a result set, the system comprising:
a processor configured for determining whether an original result set, access to which is maintained by a first cursor state on a side of a server and a second cursor state on a side of a client, is to be suspended, wherein
the original result set is generated in response to execution of a query;
means for suspending the original result set by storing a first set of data of the original result set in a storage area, wherein the means for storing a first set comprises a computer usable storage medium or a storage device, where the means for suspending the original result set comprises means for caching a first row of the first set of data into a first storage area;
means for flushing the first storage area into a second storage area, when any of a set of constraint values has been exceeded, and it is determined that the first storage area needed to be flushed, or that the first storage area is full; and
means for repeating the storing until at least required data of the original result set has been sent to the storage area, wherein upon suspension of the result set,
the means for suspending the original result set allows the client to access, without re-issuing or re-executing the query, the at least required data or a same order of the at least required data of the original result set throughout a life of the second cursor state when first cursor state is no longer available to the client.

### Claim 38

A system for continuing a suspended result set, the system comprising:
a processor configured for determining whether a result set, access to which was originally maintained by both a first cursor state on a side of the server and a second cursor state on a side of the client, is suspended from an original row source to a storage location, wherein
the result set is generated in response to execution of a query, and
the result set which is suspended from the original row source allows file client to access, without re-issuing or re-executing the query, required data or a same order of the required data of the original row source throughout a life of the second cursor state when the first cursor state is no longer available to the client,
means for determining a location of a subject row in the suspended result set in the storage location, wherein the suspended result set was suspended by one or more acts which comprise caching the subject row into a first storage area which comprises the location or a first location;
means for flushing the first storage area into a second storage area which comprises the location or a second location, when any of a set of constraint values has been exceeded, and it is determined that the first storage area needed to be flushed, or that the first storage area is full, wherein the first storage area is different from the second storage area;
means for resuming fetching the subject row from the location in the storage location; and
a display apparatus configured for displaying a result generated by the means for resuming fetching the subject row or a tangible computer-readable medium or a storage device configured for storing the result.

### Claim 39

A system for continuing from a result set being suspended, the system comprising:
a) means for determining whether suspension of the result set, access to which is maintained by a first cursor state on a side of a server and a second cursor state on a side of a client, is enabled, wherein
the result set is generated in response to execution of a query, and the act of determining whether suspension of the result is performed by a processor, and
the means for determining the result set comprises a processor;
b) means for determining if a subject row in the result set has been suspended;
c) means for determining if the subject row in the result set that is available with a first cursor and a second cursor is to be suspended, if the subject row has not been suspended;
d) means for suspending the subject row if it is determined that the subject row is to be suspended, wherein upon suspension of the subject row,
the suspended subject row in a storage area allows the client to access, without re-issuing or re-executing the query, required data or a same order of the required data of the subject row through a life of the second cursor state when the first cursor state is no longer available to the client, and
the means for suspending the subject row is invoked for execution during an absolute time period added to an average row fetch time or as a percent delay to an average row fetch time;
e) means for extracting and returning the subject row, from a suspended result set if the subject row has been suspended, or from the cursor row source if the row is not to be suspended;
f) means for repeating a)-f) until all the rows in the result set are processed; and
a display apparatus configured for displaying a result generated by the means for suspending the subject row or a tangible computer-readable medium or a storage device configured for storing the result.
