# Querying and Extracting Timeline Information from Road Traffic Sensor Data
## 5 Timeline Query Index and Analytical Query Processing
### TQ-index Construction
#### Congestion Event Detection
However, we can achieve effective query processing with the combination of \(LocationIndex\) and \(TimeIndex\) of the TQ-index. Another observation is that execution times for five roads in the \"Busan\" dataset are different. However, if we consider only the results of one road (such as G-8, G-16, and G-24), we see that the differences in execution times are small. This is consistent with the results in Figure 19.

Figure 19: Fixed date range for the “Busan” dataset. Figure 21 summarizes the experimental results for the \"Seattle\" dataset. Although there is a slight fluctuation in execution times as depicted in Figure 11(a), the query processing time remained quite stable as we increased the size of the dataset. The execution time increased linearly with the varying date range, as shown in Figure 11(b). These results shows a similar trend to the \"Busan\" dataset and demonstrate the efficiency of our QET system. Aggregation Query Processing

In this set of experiments, we present the performance evaluation results for processing the aggregation queries for the \"Busan\" and \"Seattle\" datasets. Figure 22 summarizes the results for processing \(Q_{2}\) queries for the \"Busan\" dataset. The results from the data sizes of 8, 12, and 20 months were omitted because they showed trends similar to those from the data sizes of 16 and 24 months. For the \(Q_{2}\) query type, a user specifies a start time, an end time, and road links as the query's parameters to find the most congested road in a given time range. Figure 21: Basic query processing for the “Seattle” dataset. Figure 20: Varied date range for the “Busan” dataset. Let us analyze the results shown in Figure 1(a),b. In these experiments, we fixed the date range to five days. Because of the effectiveness of the TQ-index, the overall execution time is less than 2.5 ms in the fixed date range. This is mainly because we need to check only the pre-computed values of a TQ-index to process \(Q_{2}\). Figure 1(c),d present the results under the varied date range setting. The query processing time for GongHang increases linearly as the number of dates increase, while the execution times for other roads increase slightly with the number of dates. Figure 23 shows the execution time of the aggregation query \(Q_{2}\) for the \"Seattle\" dataset. Figure 1(a) shows that there is little variation in execution times, but the overall time is less than 20 ms under the fixed date range setting. More time is required to process the \"Seattle\" dataset. The execution time for the fixed date range setting does not show significant change, even though we increase the size of the dataset. However, the execution time increases significantly with the number of dates, as depicted in Figure 1(b). These results show the same trend observed in the case of the \"Busan\" dataset. Next, we measure the performance of processing aggregate query \(Q_{3}\). \(Q_{2}\) computes the number of traffic congestion events, whereas \(Q_{3}\) tries to find the longest congestion in a specified road link within a given time range. Thus, \(Q_{2}\) requires a count function, and \(Q_{3}\) represents a maximum function. Figure 24 depicts the results for the \"Busan\" dataset. As expected, the execution times of \(Q_{3}\) are longer than those of \(Q_{2}\), because we need to check adjacent road links to calculate the longest length of the congestion. Another observation is that the query processing time remains almost the same for the fixed date setting (Figure 1(a),b), whereas the execution time is increased with the number of dates (Figure 1(c),d). We explain the correlation between the number of traffic congestion events and the query processing time in another experiment. Figure 22: Query performance \(Q_{2}\) on “Busan” dataset. Figure 25 shows the execution time of aggregation query \(Q_{3}\) for the \"Seattle\" dataset. At the fixed date setting, the execution time is fluctuating as shown in Figure 25a. The longest execution time occurs in May, then suddenly drops in June and gradually increases again.