# US 2004/0083204 A1 · Query modification analysis

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

- Number: US 2004/0083204 A1
- Document ID: US20040083204A1
- Status: Published application
- Kind: A1
- Application number: 10/279,157
- Filed: 2002-10-24
- Published: 2004-04-29
- Earliest claimed: 2002-10-24
- Assignees: International Business Machines Corporation
- Inventors: Richard D. Dettinger; Richard J. Stevens
- Web page: https://patentgrep.com/patent/US20040083204A1

## CPC

- G06F 16/90335: {Query processing}
- Y10S 707/99932: Access augmentation or optimizing
- Y10S 707/99933: Query processing, i.e. searching
- Y10S 707/99934: Query formulation, input preparation, or translation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

Methods, systems and articles of manufacture are provided for a query analysis approach used to identify “nondestructive” and “destructive” queries. In one aspect, a “non-destructive” query is one which does not return any additional results relative to results returned by a previously executed query or queries. Conversely, a “destructive” query is one which does return additional results relative to results returned by a previously executed query. If the query is determined to be destructive, the query is executed against the complete data repository (e.g., database or data warehouse). If the query is nondestructive, the query (or some restructured form thereof) is executed against a data subset of the complete data repository.

## Claims

### Claim 1

A method of processing queries, comprising:
receiving a query;
performing a comparative analysis between the query and one or more previously executed queries to determine a difference in scope with respect to results; and
executing the query against one of a first data source and a second data source depending upon the difference in scope determined by the comparative analysis, where the second data source is a subset of the first data source.

### Claim 2 (depends on 1)

The method of claim 1, wherein executing the query comprises, executing the query against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries.

### Claim 3 (depends on 1)

The method of claim 1, wherein executing the query comprises, executing the query against the second data source if a scope of the query is less than a scope of the one or more previously executed queries.

### Claim 4 (depends on 1)

The method of claim 1, wherein executing the query comprises:
executing the query against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries; and
executing the query against the second data source if the scope of the query is less than the scope of the one or more previously executed queries.

### Claim 5 (depends on 1)

The method of claim 1, wherein performing comparative analysis between the query and one or more previously executed queries to determine the difference in scope with respect to results comprises comparatively examining a structure of the query and a structure of the one or more previously executed queries.

### Claim 6 (depends on 1)

The method of claim 1, wherein the second data source comprises one or more data structures populated with results returned by execution of the one or more previously executed queries.

### Claim 7

A method of processing queries, comprising:
receiving a query;
performing a comparative analysis between the query and one or more previously executed queries to determine a difference in scope with respect to results; and
depending upon the difference in scope determined by the comparative analysis, performing one of:
executing the query against a first data source; and
restructuring the query and executing the restructured query against a second data source, where the second data source is a subset of the first data source.

### Claim 8 (depends on 7)

The method of claim 7, wherein the query is executed against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries.

### Claim 9 (depends on 7)

The method of claim 7, wherein the query is executed against the second data source if a scope of the query is less than a scope of the one or more previously executed queries.

### Claim 10 (depends on 7)

The method of claim 7, wherein the query is executed against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries; and
wherein the query is executed against the second data source if the scope of the query is less than a scope of the one or more previously executed queries.

### Claim 11 (depends on 7)

The method of claim 7, wherein performing comparative analysis between the query and one or more previously executed queries to determine the difference in scope with respect to results comprises comparatively examining a structure of the query and one or more previously executed queries.

### Claim 12 (depends on 7)

The method of claim 7, wherein performing comparative analysis between the query and one or more previously executed queries to determine the difference in scope with respect to results comprises comparatively examining a structure of the query and a structure of the one or more previously executed queries.

### Claim 13 (depends on 7)

The method of claim 7, wherein the second data source comprises one or more data structures populated with results returned by execution of the one or more previously executed queries.

### Claim 14

A method of processing queries, comprising:
receiving a query;
performing comparative analysis between a structure of the query and a structure of a plurality of previously executed queries to determine a difference in scope with respect to results; and
upon determining that a results scope of the query is less than at least one of the plurality of previously executed queries:
restructuring the query; and
executing the restructured query against a first data source, where the first data source contains results returned from execution of the at least one of the plurality of previously executed queries.

### Claim 15 (depends on 14)

The method of claim 14, wherein the first data source is a subset of a larger second data source against which the at least one of the plurality of previously executed queries was executed.

### Claim 16

A computer readable medium containing a program which, when executed, performs an operation, comprising:
performing a comparative analysis between a query received for execution and one or more previously executed queries to determine a difference in scope with respect to results; and
submitting the query for execution against one of a first data source and a second data source depending upon the difference in scope determined by the comparative analysis, where the second data source is a subset of the first data source.

### Claim 17 (depends on 16)

The computer readable medium of claim 16, wherein the query is submitted for execution against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries.

### Claim 18 (depends on 16)

The computer readable medium of claim 16, wherein the query is submitted for execution against the second data source if a scope of the query is less than a scope of the one or more previously executed queries.

### Claim 19 (depends on 16)

The computer readable medium of claim 16, submitting the query for execution comprises:
submitting the query for execution against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries; and
submitting the query for execution against the second data source if the scope of the query is less than the scope of the one or more previously executed queries.

### Claim 20 (depends on 16)

The computer readable medium of claim 16, wherein performing comparative analysis between the query and one or more previously executed queries to determine the difference in scope with respect to results comprises comparatively examining a structure of the query and a structure of the one or more previously executed queries.

### Claim 21 (depends on 16)

The computer readable medium of claim 16, wherein the second data source comprises one or more data structures populated with results returned by execution of the one or more previously executed queries.

### Claim 22

A computer readable medium containing a program which, when executed, performs an operation, comprising:
performing a comparative analysis between a query received for execution and one or more previously executed queries to determine a difference in scope with respect to results; and
depending upon the difference in scope determined by the comparative analysis, performing one of:
submitting the query for execution against a first data source; and
restructuring the query and submitting the restructured query for execution against a second data source, where the second data source is a subset of the first data source.

### Claim 23 (depends on 22)

The computer readable medium of claim 22, wherein the query is executed against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries.

### Claim 24 (depends on 22)

The computer readable medium of claim 22, wherein the query is executed against the second data source if a scope of the query is less than a scope of the one or more previously executed queries.

### Claim 25 (depends on 22)

The computer readable medium of claim 22, wherein the query is executed against the first data source if a scope of the query is greater than a scope of the one or more previously executed queries; and
wherein the query is executed against the second data source if the scope of the query is less than a scope of the one or more previously executed queries.

### Claim 26 (depends on 22)

The computer readable medium of claim 22, wherein performing comparative analysis between the query and one or more previously executed queries to determine the difference in scope with respect to results comprises comparatively examining a structure of the query and one or more previously executed queries.

### Claim 27 (depends on 22)

The computer readable medium of claim 22, wherein performing comparative analysis between the query and one or more previously executed queries to determine the difference in scope with respect to results comprises comparatively examining a structure of the query and a structure of the one or more previously executed queries.

### Claim 28 (depends on 22)

The computer readable medium of claim 22, wherein the second data source comprises one or more data structures populated with results returned by execution of the one or more previously executed queries.

### Claim 29

A computer readable medium containing a program which, when executed, performs an operation, comprising:
performing a comparative analysis between a structure of a query received for execution and a structure of a plurality of previously executed queries to determine a difference in scope with respect to results; and
upon determining that a results scope of the query is less than at least one of the plurality of previously executed queries:
restructuring the query; and
executing the restructured query against a first data source, where the first data source contains results returned from execution of the at least one of the plurality of previously executed queries.

### Claim 30 (depends on 29)

The computer readable medium of claim 29, wherein the first data source is a subset of a larger second data source against which the at least one of the plurality of previously executed queries was executed.

### Claim 31

A computer system, comprising:
a data repository, comprising a first data source and a second data source, wherein the second data source is a data subset of the first data source populated with results of previously executing queries;
a runtime component; and
a processor which, when configured with the runtime component, performs an operation comprising:
performing a comparative analysis between a structure of a query received for execution and a structure of a previously executed query to determine a difference in scope with respect to results;
upon determining that a results scope of the query is greater than the previously executed query, executing the restructured query against the first data source; and
upon determining that the results scope of the query is less than the previously executed query:
(i) restructuring the query; and
(ii) executing the restructured query against the second data source.
