# US 2022/0292066 A1 · Rowid decoding: an alternative to dictionary decoding

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

- Number: US 2022/0292066 A1
- Document ID: US20220292066A1
- Status: Published application
- Kind: A1
- Application number: 17/831,117
- Filed: 2022-06-02
- Published: 2022-09-15
- Earliest claimed: 2019-11-27
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Pit Fender; Benjamin Schlegel; Matthias Brantner
- Web page: https://patentgrep.com/patent/US20220292066A1

## CPC

- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/24573: {using data annotations, e.g. user-defined metadata}
- G06F 16/242: Query formulation
- G06F 16/24553: {of query operations}
- G06F 40/242: Dictionaries
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques described herein propose a new RIDDecode operator in a QEP that uses ROWID lookup and fetch, instead of dictionary decoding, to retrieve decoded values, in order to reduce memory pressure and speed up processing.

## Claims

### Claim 1

A method comprising:
generating a query execution plan (QEP) for a query that specifies to aggregate a particular column by at least one group column, wherein said QEP comprises:
a RIDDecode operator;
a group by plan operator that is lower than said RIDDecode operator in said QEP and that groups by said at least one group column;
a first plan operator that is lower than said group by plan operator and that generates rows from a base table;
an aggregate operator that applies an aggregate function to a rowid pseudo column of said base table, wherein said aggregate operator is lower than said RIDDecode operator but higher than said group by plan operator;
wherein generating said QEP includes:
including said rowid pseudo column, said at least one group column, and said particular column in a projection list for said first plan operator;
substituting said at least one group column with said rowid pseudo column in a projection list for said group by operator;
executing said RIDDecode operator while executing said QEP.

### Claim 2 (depends on 1)

The method of claim 1, wherein each of said at least one group column is dictionary encoded.

### Claim 3 (depends on 1)

The method of claim 1, wherein substituting said at least one group column with said rowid pseudo column comprises:
removing said at least one group column from said group by plan operator;
adding said rowid pseudo column to said group by plan operator.

### Claim 4 (depends on 1)

The method of claim 1, wherein said aggregate function is a maximum function or a minimum function.

### Claim 5 (depends on 1)

The method of claim 1, wherein said RIDDecode operator is configured to retrieve a value for at least group column using a rowid from said rowid pseudo column.

### Claim 6

One or more non-transitory computer-readable storage medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform functions comprising:
generating a query execution plan (QEP) for a query that specifies to aggregate a particular column by at least one group column, wherein said QEP comprises:
a RIDDecode operator;
a group by plan operator that is lower than said RIDDecode operator in said QEP and that groups by said at least one group column;
a first plan operator that is lower than said group by plan operator and that generates rows from a base table;
an aggregate operator that applies an aggregate function to a rowid pseudo column of said base table, wherein said aggregate operator is lower than said RIDDecode operator but higher than said group by plan operator;
wherein generating said QEP includes:
including said rowid pseudo column, said at least one group column, and said particular column in a projection list for said first plan operator;
substituting said at least one group column with said rowid pseudo column in a projection list for said group by operator;
executing said RIDDecode operator while executing said QEP.

### Claim 7 (depends on 6)

The one or more non-transitory computer-readable storage medium of claim 6, wherein each of said at least one group column is dictionary encoded.

### Claim 8 (depends on 6)

The one or more non-transitory computer-readable storage medium of claim 6, wherein substituting said at least one group column with said rowid pseudo column comprises:
removing said at least one group column from said group by plan operator;
adding said rowid pseudo column to said group by plan operator.

### Claim 9 (depends on 6)

The one or more non-transitory computer-readable storage medium of claim 6, wherein said aggregate function is a maximum function or a minimum function.

### Claim 10 (depends on 6)

The one or more non-transitory computer-readable storage medium of claim 6, wherein said RIDDecode operator is configured to retrieve a value for at least group column using a rowid from said rowid pseudo column.
