# US 2015/0178277 A1 · System and method predicting effect of cache on query elapsed response time during application development stage

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

- Number: US 2015/0178277 A1
- Document ID: US20150178277A1
- Status: Published application
- Kind: A1
- Application number: 14/566,276
- Filed: 2014-12-10
- Published: 2015-06-25
- Earliest claimed: 2013-12-23
- Assignees: Tata Consultancy Services Limited
- Applicants: Tata Consultancy Services Limited
- Inventors: Rekha Singhal
- Web page: https://patentgrep.com/patent/US20150178277A1

## CPC

- G06F 16/24552: {Database cache management}
- G06F 16/35: Clustering; Classification
- G06F 16/9577: {Optimising the visualization of content, e.g. distillation of HTML documents}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

System(s) and method(s) for predicting effect of database cache on query elapsed response time during an application development stage are disclosed. Query executed on a database is classified and a query type is obtained. Database statistics are collected to further determine one or more cache miss factors with respect to the query type. One or more time components are calculated due to the one or more cache miss factors with respect to the query type. The one or more time components are used to predict the query elapsed response time for varying size of the database.

## Claims

### Claim 1

A system predicting effect of cache on query elapsed response time during an application development stage, the system comprising:
a processor; and
a memory coupled to the processor, wherein the processor executes a plurality of modules stored in the memory, and wherein the plurality of module comprise:
a classification module to classify a query executed on a database to obtain a query type, wherein the query is classified based on a database access pattern of the query along with a relation between one or more keys associated with the query, wherein the key refers to one or more columns referred to in the query;
a determination module to:
collect one or more database statistics with respect to the query type, wherein the database statistics refers to at least one data distribution pattern in the database and at least one data access pattern of the query inside the database; and
determine one or more cache miss factors by using the database statistics, wherein the one or more cache miss factors predicts number of access of the cache by the query not found in the database cache;
a calculation module to calculate one or more time components associated with processing of the query in the database with respect to the one or more cache miss factors; and
a prediction module o predict the query elapsed response time by using the one or more time related values for varying size of the database.

### Claim 2 (depends on 1)

The system of claim 1, wherein the query is executed over a small size database, and wherein the query comprises a non unique index scan query, wherein the non unique index scan query is the query having a repeated access to data blocks present in the database.

### Claim 3 (depends on 1)

The system of claim 1, wherein the data distribution refers to a physical layout of table rows in the database and the data access pattern determines an order of key values used by the query to access the data in the database.

### Claim 4 (depends on 1)

The system of claim 1, wherein the data access pattern follows a Uniform Random (UR) distribution pattern and a Slotted Uniform Random (SUR) distribution pattern.

### Claim 5 (depends on 1)

The system of claim 1, wherein the cache comprises number of database cache (DB) and number of operating system (OS) cache for a given size of database, given size of database cache and given size of operating system cache.

### Claim 6 (depends on 1)

The system of claim 1, wherein the determination module uses a Blackbox approach to determine the one or more cache miss factors, and wherein the determination module further:
determines a Database Cache miss factor for Uniform Random (UR) access pattern and Database Cache miss factor for a Slotted Uniform Random (SUR) pattern; and
determines an Operating System (OS) cache miss factor for Uniform Random (UR) access pattern and a Database Cache miss factor for a Slotted Uniform Random (SUR) pattern.

### Claim 7 (depends on 1)

The system of claim 1, wherein the one or more cache miss factors comprise a Database cache miss factor and an Operating System (OS) cache miss factor.

### Claim 8 (depends on 1)

The system of claim 1, wherein the one or more time related values comprises a Central Processing Unit (CPU) time and an Input-Output (IO) time associated with the processing of the query.

### Claim 9 (depends on 8)

The system of claim 8, wherein the CPU time comprises a user time of the query processing and a system time of the query processing.

### Claim 10 (depends on 9)

The system of claim 9, wherein the user time comprises of time spent by operators, DB cache access time, and network time required in sending data to a user with respect to the query.

### Claim 11 (depends on 1)

The system of claim 1, wherein the calculation module extrapolates the one or more time components based on the database statistics.

### Claim 12 (depends on 1)

The system of claim 1, wherein the prediction module adds the one or more time components to predict the query elapsed response time.

### Claim 13

A method predicting effect of cache on query elapsed response time during an application development stage, the method comprising:
classifying a query executed on a database to obtain a query type, wherein the query is classified based on a database access pattern of the query along with a relation between one or more keys associated with the query, wherein the key refers to one or more columns referred to in the query;
collecting one or more database statistics with respect to the query type, wherein the database statistics refers to at least one data distribution pattern in the database and at least one data access pattern of the query inside the database; and
determining one or more cache miss factors by using the database statistics, wherein the one or more cache miss factors predicts number of access of the cache by the query not found in the database cache;
calculating one or more time related value associated with processing of the query in the database with respect to the one or more cache miss factors; and
predicting the query elapsed response time by using the one or more time related values for varying size of the database.

### Claim 14 (depends on 13)

The method of claim 13, wherein determining one or more cache miss factors comprises:
determining a Database Cache miss factor for Uniform Random (UR) access pattern and Database Cache miss factor for Slotted Uniform Random (SUR) pattern; and
determining an Operating System (OS) cache miss factor for Uniform Random (UR) access pattern and Database Cache miss factor for Slotted Uniform Random (SUR) pattern.

### Claim 15

A computer program product having embodied thereon a computer program predicting effect of cache on query elapsed response time during an application development stage, the computer program product comprising:
a program code for classifying a query executed on a database to obtain a query type, wherein the query is classified based on a database access pattern of the query along with a relation between one or more keys associated with the query;
a program code for collecting one or more database statistics with respect to the query type, wherein the database statistics refers to a data distribution in the database and the data access pattern of the query inside the database;
a program code for determining one or more cache miss factors by using the database statistics, wherein the one or more cache miss factors predicts access of the cache by the query;
a program code for calculating one or more time related value associated with processing of the query in the database with respect to the one or more cache miss factors; and
a program code for predicting the query elapsed response time by using the one or more time related values for varying size of the database.
