# US 2025/0094420 A1 · Query and data adaptive synopsis table

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

- Number: US 2025/0094420 A1
- Document ID: US20250094420A1
- Status: Published application
- Kind: A1
- Application number: 18/468,769
- Filed: 2023-09-18
- Published: 2025-03-20
- Earliest claimed: 2023-09-18
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Oliver Schiller; Tobias Kevin Fränzel; James Liam Finnie; Thomas Friedhelm Böhme; Toni Bollinger; Wieland Philipp Hoffmann
- Web page: https://patentgrep.com/patent/US20250094420A1

## CPC

- G06F 16/24539: {using cached or materialised query results}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Aspects of the invention include techniques for providing a query and data adaptive synopsis table. A non-limiting example method includes building a first synopsis table containing metadata for a database table. Information from queries executed against the database table is collected. The collected information is analyzed, responsive to a number of queries executed against the database table exceeding a query collection threshold, to identify one or more queries for which the first synopsis table was suboptimal. The method includes building, for each of the one or more queries for which the first synopsis table was suboptimal, a second synopsis table.

## Claims

### Claim 1

A computer-implemented method comprising:
building a first synopsis table containing metadata for a database table;
collecting information from queries executed against the database table, wherein collecting information from queries comprises identifying the n most used literals in equality predicates across the queries;
responsive to determining that a number of queries executed against the database table exceeds a query collection threshold, analyzing the collected information to identify one or more queries for which the first synopsis table was suboptimal; and
building, for each of the one or more queries for which the first synopsis table was suboptimal, a second synopsis table, wherein building the second synopsis table comprises building a bit vector of length n such that each bit in the bit vector represents one literal of the n most used literals and adding the bit vector of length n to the first synopsis table.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein first synopsis tables are built for every r rows of the database table.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising processing the queries executed against the database table, wherein processing a query comprises reading metadata in the first synopsis table, executing the query against the database table based on query optimizations learned from the metadata, and returning results of the query.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein collecting information from the queries comprises collecting literals and predicates of the query.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein a suboptimal synopsis table comprises a synopsis table that was not relevant to the respective query.

### Claim at position 6

6-7. (canceled)

### Claim 8

A system having a memory, computer readable instructions, and one or more processors for executing the computer readable instructions, the computer readable instructions controlling the one or more processors to perform operations comprising:
building a first synopsis table containing metadata for a database table;
collecting information from queries executed against the database table, wherein collecting information from queries comprises identifying the n most used literals in equality predicates across the queries;
responsive to determining that a number of queries executed against the database table exceeds a query collection threshold, analyzing the collected information to identify one or more queries for which the first synopsis table was suboptimal; and
building, for each of the one or more queries for which the first synopsis table was suboptimal, a second synopsis table.

### Claim 9 (depends on 8)

The system of claim 8, wherein first synopsis tables are built for every r rows of the database table.

### Claim 10 (depends on 8)

The system of claim 8, further comprising processing the queries executed against the database table, wherein processing a query comprises reading metadata in the first synopsis table, executing the query against the database table based on query optimizations learned from the metadata, and returning results of the query.

### Claim 11 (depends on 8)

The system of claim 8, wherein collecting information from the queries comprises collecting literals and predicates of the query.

### Claim 12 (depends on 8)

The system of claim 8, wherein a suboptimal synopsis table comprises a synopsis table that was not relevant to the respective query.

### Claim at position 12

13-14. (canceled)

### Claim 15

A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by one or more processors to cause the one or more processors to perform operations comprising:
building a first synopsis table containing metadata for a database table;
collecting information from queries executed against the database table, wherein collecting information from queries comprises identifying the n most used literals in equality predicates across the queries;
responsive to determining that a number of queries executed against the database table exceeds a query collection threshold, analyzing the collected information to identify one or more queries for which the first synopsis table was suboptimal; and
building, for each of the one or more queries for which the first synopsis table was suboptimal, a second synopsis table, wherein building the second synopsis table comprises building a bit vector of length n such that each bit in the bit vector represents one literal of the n most used literals and adding the bit vector of length n to the first synopsis table.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein first synopsis tables are built for every r rows of the database table.

### Claim 17 (depends on 15)

The computer program product of claim 15, further comprising processing the queries executed against the database table, wherein processing a query comprises reading metadata in the first synopsis table, executing the query against the database table based on query optimizations learned from the metadata, and returning results of the query.

### Claim 18 (depends on 15)

The computer program product of claim 15, wherein a suboptimal synopsis table comprises a synopsis table that was not relevant to the respective query.

### Claim at position 17

19-20. (canceled)
