## 23.2 Query Response Time index (QRTi)

QRTi stands for "Query Response Time index". It is a "quality of service" measurement for each query, and it uses the Apdex formula for that calculation: Apdex on Wikipedia.

### How QRTi is Defined

The three measurement conditions are "optimum", "acceptable", and "unacceptable", which are defined as:

Table 23.1 QRTi value definitions

TypeDefault time valuesAssigned valueDescriptionColor
Optimum100ms1.00 (100%)The optimal time frameGreen
Acceptable4 * Optimum -- 100ms to 400ms0.50 (50%)An acceptable time frameYellow
UnacceptableExceeds Acceptable -- greater than 400ms0.00 (0%)An unacceptable time frameRed

### An example calculation

From there, we calculate an average to determine the final QRTi value. For Example, if there are 100 executions of the digested/canonical query, where 60 finished below 100ms (the optimal time frame), 30 between 100ms and 400ms (the acceptable time frame), and the remaining 10 took longer than 400ms (unacceptable time), then the QRTi score is:

```      ( (60 + (30 / 2) + (10*0) ) / 100) = 0.75.
```