# US 2019/0057133 A1 · Systems and methods of bounded scans on multi-column keys of a database

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

- Number: US 2019/0057133 A1
- Document ID: US20190057133A1
- Status: Published application
- Kind: A1
- Application number: 15/677,737
- Filed: 2017-08-15
- Published: 2019-02-21
- Earliest claimed: 2017-08-15
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Mikhail Chainani; Ashwini Bijwe
- Web page: https://patentgrep.com/patent/US20190057133A1

## CPC

- G06F 16/24564: {Applying rules; Deductive queries}
- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/2272: {Management thereof}
- G06F 16/24554: {Unary operations; Data partitioning operations}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods perform a bounded scan on multi-column keys of a database system which stores data in a storage device. The systems and methods may include creating an index on one or more columns of a table of a database stored in the storage device. A first query for data in the indexed table may be received by the database system, where the query includes a scan range operation. The database system may translate the first query that includes the scan range operation into a plurality of sub-queries having respective scan ranges. A second query may be formed by combining the sub-queries with an operation. The systems and methods may process the second query and output a result of the second query.

## Claims

### Claim 1

A computerized method for performing a bounded scan on multi-column keys of a database system which stores data in a storage device, the method comprising:
creating, at the database system, an index on one or more columns of a table of a database stored in the storage device;
receiving, at the database system, a first query for data in the indexed table, wherein the query includes a scan range operation;
translating, at the database system, the first query that includes the scan range operation into a plurality of sub-queries having respective scan ranges;
forming, at the database system, a second query by combining the sub-queries with an operation; and
processing, at the database system, the formed second query and outputting a result of the second query.

### Claim 2 (depends on 1)

The method of claim 1, wherein the combining the sub-queries are combined with a union all operation.

### Claim 3 (depends on 1)

The method of claim 1, wherein the translating the first query into the plurality of sub-queries having respective scan ranges to reduce the complexity of the first query.

### Claim 4 (depends on 1)

The method of claim 1, wherein the scan range operation has a lower bound and an upper bound, the method further comprising:
returning zero rows, or one or more rows with column values between the lower bound and the upper bound.

### Claim 5 (depends on 1)

The method of claim 1, wherein the scan range operation has a lower bound and an upper bound, the method further comprising:
returning no rows when column values of the upper bound are before the lower bound values.

### Claim 6 (depends on 1)

The method of claim 1, wherein the scan range operation has a lower bound and an upper bound, the method further comprising:
when column values of the lower bound are null, returning zero rows or one or more rows from the beginning of the index are returned.

### Claim 7 (depends on 1)

The method of claim 1, wherein the scan range operation has a lower bound and an upper bound, the method further comprising:
when column values of the upper bound are null, returning one or more rows until the end of the index are returned.

### Claim 8 (depends on 1)

The method of claim 1, wherein column value ordering of the indexed table is application dependent.

### Claim 9 (depends on 1)

The method of claim 1, wherein the scan range operation of the received first query for data in the indexed table includes at least one from the group consisting of: a full scan of the indexed table and a partial scan of the indexed data.

### Claim 10 (depends on 9)

The method of claim 9, wherein the scan range operation of the received first query for data in the indexed table is based on an application that provides the query to the database system.

### Claim 11 (depends on 9)

The method of claim 9, wherein at least one of the lower bound and the upper bound is selected from the group consisting of: null, an inclusive bound, and an exclusive bound.

### Claim 12

A system to perform a bounded scan on multi-column keys comprising:
a storage device to store data of a database; and
a server system to:
create an index on one or more columns of a table of a database stored in the storage device;
receive a first query for data in the indexed table, wherein the query includes a scan range operation;
translate the first query that includes the scan range operation into a plurality of sub-queries having respective scan ranges;
form a second query by combining the sub-queries with an operation; and
process the formed second query and output a result of the second query.

### Claim 13 (depends on 12)

The system of claim 12, wherein the server system combines the sub-queries by using a union all operation.

### Claim 14 (depends on 12)

The system of claim 12, wherein the server system translates the first query into the plurality of sub-queries having respective scan ranges to reduce the complexity of the first query.

### Claim 15 (depends on 12)

The system of claim 12, wherein the scan range operation has a lower bound and an upper bound, and
wherein the server system returns zero rows, or one or more rows with column values between the lower bound and the upper bound.

### Claim 16 (depends on 12)

The system of claim 12, wherein the scan range operation has a lower bound and an upper bound, the method further comprising:
returning no rows when column values of the upper bound are before the lower bound values.

### Claim 17 (depends on 12)

The system of claim 12, wherein the scan range operation has a lower bound and an upper bound, and
wherein the server system returns zero rows, or one or more rows from the beginning of the index when column values of the lower bound are null.

### Claim 18 (depends on 12)

The system of claim 12, wherein the scan range operation has a lower bound and an upper bound, and
wherein the server system returns zero rows, or one or more rows until the end of the index are returned when column values of the upper bound are null.

### Claim 19 (depends on 12)

The system of claim 12, wherein column value ordering of the indexed table is application dependent.

### Claim 20 (depends on 12)

The system of claim 12, wherein the scan range operation of the received first query for data in the indexed table includes at least one from the group consisting of: a full scan of the indexed table and a partial scan of the indexed data.

### Claim 21 (depends on 20)

The system of claim 20, wherein the scan range operation of the received first query for data in the indexed table is based on an application that provides the query to the server system.

### Claim 22 (depends on 20)

The system of claim 20, wherein at least one of the lower bound and the upper bound is selected from the group consisting of: null, an inclusive bound, and an exclusive bound.
