# Querying and Extracting Timeline Information from Road Traffic Sensor Data
## 5 Timeline Query Index and Analytical Query Processing
### TQ-index Construction
#### Congestion Event Detection
The memory consumption of TQ-index for the \"Seattle\" dataset is small because it is collected from highways, which typically have less congestion than urban streets. #### 6.3.2 Query Processing Performance Results

In this subsection, we analyze the query performance of the QET system that utilizes a TQ-index to maintain the timeline modeling. We report experimental results for processing three different types of queries, as explained in Section 5.3. A user can specify three query parameters: (1) a set of road segments; (2) a start date; and (3) an end date. Thus, we conduct experiments with two settings: (1) a fixed date range setting;

Figure 16: Construction time. Figure 17: Size comparison between a TQ-index and raw traffic data. and (2) a varied date range setting. We randomly chose a contiguous five days between December 2013 and April 2014 (between May and August) for the fixed date range setting of Busan (Seattle), whereas we varied the length of the date range from 10 to 50 days for the varied date range setting. We randomly chose road links from three primary roads (SuYeong, Mandeok, GongHang) and two city highways (BeonYeong, Dongseo) for the \"Busan\" dataset. Similarly we randomly selected road links of the southbound and northbound freeway lanes for the \"Seattle\" dataset. ### Basic Query Processing

In the first set of experiments, we evaluate the effectiveness of basic query processing by comparing our TQ-index method with a baseline approach. The baseline approach scans all raw files to obtain the results. Figure 18 depicts the experimental results by varying the date range. Clearly, it outperformed the baseline approach by utilizing the TQ-index. The execution time of the baseline approach increased with the date range, whereas the execution time of the TQ-index approach remained almost unchanged. The TQ-index enables us to efficiently locate the necessary congestion events due to the benefits of the timeline modeling. Note that because the performance of the TQ-index is always superior to the baseline approach, we only report the performance of the TQ-index in the subsequent experimental results. In the next set of experiments, we investigate the performance of the basic query processing under the various situations. First, we chose five different road links and randomly selected five consecutive days. Then, we varied the size of the \"Busan\" dataset from 8 months to 24 months. Figure 19 shows the results. We observed that the difference in execution time is less than 0.2 ms although we increased the size of data for BeonYeong in December 2013 from Figure 19a. For different months, the running time is slightly changed because we increased the data size, which demonstrates the efficiency of our QET system. From the graphs shown in Figure 19b through 19e, similar trends can be observed from December 2013 to April 2014 at other road links. This is mainly because there are no significant differences in the number of events for the fixed date range. The results indicate that the TQ-index effectively processes the query by checking only relevant congestion events, regardless of the dataset size. Figure 20 shows the results for varying date ranges from 10 to 50 in increments of 10 days. The results for datasets with 12 and 20 months were omitted because they showed a similar trend to the datasets with 8, 16, and 24 months. In the graph, the notation \"B-8\" means that we use the eight-month data of BeonYeong road to construct a TQ-index. G, S, M, and D represent GongHang, SuYeong,

Figure 18: Brute force comparison. ManDeok, and Dongseo, respectively. As expected, the execution time for GongHang (denoted by \"G\") increases linearly as we vary the date range. However, the execution times for BeonYong, Suyeong, Mandeok, and Dongseo do not increase considerably compared to the increases in the date ranges. Because the number of congestion events are increased with the date range, it takes more time to follow the \(CongestionEvnetList\) stored in the TQ-index.