# US 9,436,735 B1 · Access path optimization through system statistics

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

- Number: US 9,436,735 B1
- Document ID: US9436735B1
- Status: Granted
- Kind: B1
- Application number: 15/016,461
- Filed: 2016-02-05
- Granted: 2016-09-06
- Earliest claimed: 2015-07-14
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Hao Feng; Shuo Li; ShengYan Sun; Xin Ying Yang
- Web page: https://patentgrep.com/patent/US9436735B1

## CPC

- G06F 16/24545: {Selectivity estimation or determination}
- G06F 16/24534: {Query rewriting; Transformation}
- G06F 16/24549: {Run-time optimisation}
- G06F 16/245: Query processing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In an approach for calculating one or more access paths during bind time, a computer receives a query. The computer identifies one or more access paths for processing the received query, wherein the one or more access paths include steps associated with retrieving data from a database based on the received query. The computer calculates resource costs associated with processing the received query on the one or more identified access paths based on one of more of: resources utilized to perform steps associated with processing the received query, and system statistics associated with the one or more identified access paths.

## Claims

### Claim 1

A method for calculating one or more access paths during bind time, the method comprising:
receiving, by one or more computer processors, a query;
identifying, by one or more computer processors, one or more access paths for processing the received query, wherein the one or more access paths include steps associated with retrieving data from a database based on the received query;
calculating, by one or more computer processors, resource costs associated with processing the received query on the one or more identified access paths based on one or more of: resources utilized to perform steps associated with processing the received query, and system statistics associated with the one or more identified access paths,
wherein the resource costs include: central processing unit (CPU) cost, input/output (I/O) costs, buffer pool usage, record identifier (RID) usage, and work file usage;
determining, by one or more computer processors, whether the received query exits bind time, wherein the bind time includes preparation to execute the received query, establish a relationship with the database, and validate the received query to detect and correct potential errors;
responsive to determining the received query does not exit bind time, retrieving system statistics associated with the one or more identified access paths based on one or more of: a time-based interval, short-period statistics, long-period statistics, and real-time statistics;
identifying, by one or more computer processors, resource usage changes associated with the one or more identified access paths;
determining, by one or more computer processors, resource usage weight changes associated with the identified resource usage changes;
recalculating, by one or more computer processors, the resource costs associated with the one or more identified access paths based on the retrieved system statistics and the determined resource usage weight changes associated with the identified resource usage changes; and
storing, by one or more computer processors, the recalculated resource costs associated with the one or more identified access paths during bind time.
