# US 2016/0253379 A1 · Database query execution tracing and data generation for diagnosing execution issues

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

- Number: US 2016/0253379 A1
- Document ID: US20160253379A1
- Status: Published application
- Kind: A1
- Application number: 14/632,236
- Filed: 2015-02-26
- Published: 2016-09-01
- Earliest claimed: 2015-02-26
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: James A. Ford; Lakshman R. Sakaray; Paul-John A. To
- Web page: https://patentgrep.com/patent/US20160253379A1

## CPC

- G06F 16/2453: Query optimisation
- G06F 11/362: Debugging of software
- G06F 16/2425: {Iterative querying; Query formulation based on the results of a preceding query}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Trace data is received that was captured for a execution of a first query on first input data. The trace data associates clauses of the first query with respective evaluation states that arise during the execution. Second input data is generated from the trace data without accessing the first input data. An execution of a second query is performed on the second input data, wherein performing the execution of the second query on the second input data reproduces evaluation states from the execution of the first query on the first input data.

## Claims

### Claim at position 1

1-11. (canceled)

### Claim 12

A system comprising:
a processor; and
a computer readable storage medium connected to the processor, wherein the computer readable storage medium has stored thereon a program for controlling the processor, and wherein the processor is operative with the program to execute the program for:
receiving trace data captured for an execution of a first query on first input data, wherein the trace data associates clauses of the query with respective evaluation states that arise during the execution;
generating second input data from the trace data without accessing the first input data, so that the first input data is kept private; and
performing an execution of a second query on the second input data, wherein performing the execution of the second query on the second input data reproduces evaluation states from the first execution of the first query on the first input data.

### Claim 13

A computer program product, the computer program product including a computer readable storage medium having instructions stored thereon for execution by a computer system, wherein the instructions, when executed by the computer system, cause the computer system to implement a method comprising:
receiving trace data captured for an execution of a first query on first input data, wherein the trace data associates clauses of the query with respective evaluation states that arise during the first execution;
generating second input data from the trace data without accessing the first input data, so that the first input data is kept private; and
performing an execution of a second query on the second input data, wherein performing the execution of the second query on the second input data reproduces evaluation states from the execution of the first query on the first input data.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the first input data include data values and generating the second input data from the trace data without accessing the first input data comprises:
generating values for the second input data corresponding to respective ones of the first input data values, wherein each second input data value has a value such that in execution of the second query each second input data value produces the same evaluation state as the evaluation state captured in the trace data for the corresponding first input data value but is otherwise independent of the corresponding first input data value.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the trace data includes counts of respective combinations of the evaluation states from the first execution applying the clauses of the first query to rows of the first input data.

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein generating the second input data from the trace data without accessing the first input data comprises:
generating random values constrained to ranges such that executing the second query on the second input data reproduces the same number of combinations for a predetermined type of the evaluation state combinations.

### Claim 17 (depends on 15)

The computer program product of claim 15, wherein generating the second input data from the trace data without accessing the first input data comprises:
generating data that cause the execution of the second query to reproduce true evaluation states of the execution of the first query on the first input data, excluding unevaluated evaluation states of the execution of the first query on the first input data.

### Claim 18 (depends on 15)

The computer program product of claim 15, wherein the instructions, when executed by the computer system, cause the computer system to implement a method comprising:
determining whether a union result of the evaluation states in the trace data is true for each clause in the first query.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein the instructions, when executed by the computer system, cause the computer system to implement a method comprising:
generating the second query from the first query, wherein generating the second query includes eliminating a clause from the first query when the union result for the clause being eliminated is not true.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein generating the alternative input data responsive to the trace data and the schema for the first input data comprises:
generating data that cause execution of the execution of the second query to reproduce evaluation states of the execution of the first query only for the clauses having a true union state.
