# US 10,956,421 B2 · Query restartability

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

- Number: US 10,956,421 B2
- Document ID: US10956421B2
- Status: Granted
- Kind: B2
- Application number: 16/235,123
- Filed: 2018-12-28
- Published: 2019-05-23
- Granted: 2021-03-23
- Earliest claimed: 2016-09-14
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Yevgeniy Kogan; Rajesh Rao; Sergey Melnik
- Web page: https://patentgrep.com/patent/US10956421B2

## CPC

- G06F 16/2455: Query execution
- G06F 16/245: Query processing
- G06F 16/24535: {of sub-queries or views}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for restarting a query using a token. One of the methods includes receiving, by a computer from a requesting device, a query; determining, using a data storage system, a current result responsive to the query; generating, using the current result, a restart token that represents operations performed to determine a plurality of results responsive to the query including the current result responsive to the query and that can be used to determine a new result responsive to the query that was not included in the plurality of results responsive to the query; and providing, to the requesting device, a message that includes a) first data for the restart token that represents operations performed to determine the plurality of results responsive to the query and b) second data for the current result responsive to the query.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving, by a computer from a requesting device, a particular query for data distributed across a data storage system;
determining, using the data storage system, a current result responsive to the particular query by determining, using the data storage system, a response to the particular query, the response comprising one or more current rows and stored in a data storage system;
generating, using the current result responsive to the particular query, a restart token that represents operations performed to determine a plurality of results responsive to the particular query and that can be used to determine a new result responsive to the particular query that was not included in the plurality of results responsive to the particular query, the plurality of results including the current result responsive to the particular query, the generating comprising, without storing the restart token in persistent storage:
determining that the one or more current rows of the response to the particular query stored in the data storage system are sorted by a key; and
in response to determining that the one or more current rows of the response to the particular query stored in the data storage system are sorted by the key, determining an index for a last row in the one or more current rows of the response to the particular query; and
providing, to the requesting device, a message that includes a) first data for the restart token that represents operations performed to determine the plurality of results responsive to the particular query, the first data being for the index for the last row in the one or more current rows of the response to the particular query, and b) second data for the current result responsive to the particular query, the second data identifying content of the one or more current rows of the response to the particular query.

### Claim 2 (depends on 1)

The method of claim 1, wherein the restart token includes the key.

### Claim 3

A non-transitory computer readable storage medium storing instructions executable by a data processing apparatus and upon such execution cause the data processing apparatus to perform operations comprising:
receiving, by a computer from a requesting device, a particular query for data distributed across a data storage system;
determining, using the data storage system, a current result responsive to the particular query by determining, using the data storage system, a response to the particular query, the response comprising one or more current rows and stored in a data storage system;
generating, using the current result responsive to the particular query, a restart token that represents operations performed to determine a plurality of results responsive to the particular query and that can be used to determine a new result responsive to the particular query that was not included in the plurality of results responsive to the particular query, the plurality of results including the current result responsive to the particular query, the generating comprising, without storing the restart token in persistent storage:
determining that the one or more current rows of the response to the particular query stored in the data storage system are sorted by a key; and
in response to determining that the one or more current rows of the response to the query stored in the data storage system are sorted by a key, determining an index for a last row in the one or more current rows of the response to the particular query; and
providing, to the requesting device, a message that includes a) first data for the restart token that represents operations performed to determine the plurality of results responsive to the particular query, the first data being for the index for the last row in the one or more current rows of the response to the particular query, and b) second data for the current result of the response to the particular query, the second data identifying content of the one or more current rows of the response to the particular query.

### Claim 4 (depends on 3)

The non-transitory computer readable storage medium of claim 3, wherein the restart token includes the key.

### Claim 5

A system comprising:
a data processing apparatus; and
a non-transitory computer readable storage medium in data communication with the data processing apparatus and storing instructions executable by the data processing apparatus and upon such execution cause the data processing apparatus to perform operations comprising:
receiving, by a computer from a requesting device, a particular query for data distributed across a data storage system;
determining, using a data storage system, a current result responsive to the particular query—by determining, using the data storage system, a response to the particular query, the response comprising one or more current rows responsive to the particular query and stored in a data storage system;
generating, using the current result responsive to the particular query, a restart token that represents operations performed to determine a plurality of results responsive to the particular query and that can be used to determine a new result responsive to the particular query that was not included in the plurality of results responsive to the particular query, the plurality of results including the current result responsive to the particular query, the generating comprising, without storing the restart token in persistent storage:
determining that the one or more current rows of the response to the particular query stored in the data storage system are sorted by a key; and
in response to determining that the one or more current rows of the response to the query stored in the data storage system are sorted by a key, determining an index for a last row in the one or more current rows of the response to the particular query; and
providing, to the requesting device, a message that includes a) first data for the restart token that represents operations performed to determine the plurality of results responsive to the particular query, the first data being for the index for the last row in the one or more current rows of the response to the particular query, and b) second data for the current result responsive to the particular query, the second data identifying content of the one or more current rows of the response to the particular query.

### Claim 6 (depends on 5)

The system of claim 5, wherein the restart token includes the key.
