A Comparative Study of Database Indexing Strategies for Time-Series Queries
Keywords:
time-series databases; indexing; B+ trees; log-structured merge trees; columnar storage; similarity searchAbstract
Time-series workloads combine high-rate append, bounded temporal range scans, aggregation over regular windows, similarity search over derived representations, and retention-driven deletion. These operations expose a mismatch between classical ordered indexes and the access patterns of modern monitoring and sensor systems. This paper develops a comparative, model-based study of database indexing strategies for time-series queries. It first formalizes the workload in terms of series, query intervals, projected measures, ingestion pressure, and retention. It then classifies six strategy families: time-clustered B+ trees, log-structured merge trees, columnar storage with segment pruning, distributed partitioned indexes, dimensionality-reduced similarity indexes, and specialized in-memory or storage-layer time-series structures. The central contribution is an analytical framework that relates each family to range-query cost, write amplification, space amplification, pruning effectiveness, and similarity-search admissibility. Display equations express B+ tree page traversal, LSM read and write costs, feature-distance lower bounds, zone-map pruning probability, and a workload-weighted index-selection objective. The analysis derives conditions under which B+ trees favor selective temporal ranges, LSM trees favor sustained ingestion at the expense of read and compaction overhead, columnar segment indexes favor aggregation and compression, and similarity indexes require lower-bounding transforms with careful dimensionality control. The framework identifies failure modes involving out-of-order ingestion, retention deletion, duplicate timestamps, and nonstationary measure variance. Its significance lies in providing a transparent basis for workload-aware index selection and for designing comparative evaluations that separate query semantics from storage-engine effects.
References
1. Snodgrass, R. T. (1995). The TSQL2 temporal query language. Kluwer Academic Publishers.
2. Jensen, C. S., & Snodgrass, R. T. (1999). Temporal data management. IEEE Transactions on Knowledge and Data Engineering, 11(1), 36–44. https://doi.org/10.1109/69.755613
3. Comer, D. (1979). The ubiquitous B-tree. ACM Computing Surveys, 11(2), 121–137. https://doi.org/10.1145/356770.356776
4. Bayer, R., & McCreight, E. (1972). Organization and maintenance of large ordered indexes. Acta Informatica, 1(3), 173–189. https://doi.org/10.1007/BF00288683
5. Graefe, G. (2011). Modern B-tree techniques. Foundations and Trends in Databases, 3(4), 203–402. https://doi.org/10.1561/1900000028
6. O'Neil, P., Cheng, E., Gawlick, D., & O'Neil, E. (1996). The log-structured merge-tree (LSM-tree). Acta Informatica, 33(4), 351–385. https://doi.org/10.1007/s002360050048
7. Abadi, D. J., Madden, S. R., & Hachem, N. (2008). Column-stores vs. row-stores: How different are they really? In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data (pp. 967–980). ACM. https://doi.org/10.1145/1376616.1376712
8. Stonebraker, M., Abadi, D. J., Batkin, A., Chen, X., Cherniack, M., Ferreira, M., Lau, E., Lin, A., Madden, S., O'Neil, E., O'Neil, P., Rasin, A., Tran, N., & Zdonik, S. (2005). C-Store: A column-oriented DBMS. In Proceedings of the 31st International Conference on Very Large Data Bases (pp. 553–564). VLDB Endowment.
9. Chang, F., Dean, J., Ghemawat, S., Hsieh, W. C., Wallach, D. A., Burrows, M., Chandra, T., Fikes, A., & Gruber, R. E. (2006). Bigtable: A distributed storage system for structured data. In Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation (pp. 205–218). USENIX Association.
10. Lakshman, A., & Malik, P. (2010). Cassandra: A decentralized structured storage system. ACM SIGOPS Operating Systems Review, 44(2), 35–40. https://doi.org/10.1145/1773912.1773922
11. Kreps, J., Narkhede, N., & Rao, J. (2011). Kafka: A distributed messaging system for log processing. In Proceedings of the NetDB Workshop.
12. Agrawal, R., Faloutsos, C., & Swami, A. (1993). Efficient similarity search in sequence databases. In Proceedings of the 4th International Conference on Foundations of Data Organization and Algorithms (pp. 69–84). Springer. https://doi.org/10.1007/3-540-57301-1_5
13. Faloutsos, C., Ranganathan, M., & Manolopoulos, Y. (1994). Fast subsequence matching in time-series databases. In Proceedings of the 1994 ACM SIGMOD International Conference on Management of Data (pp. 419–429). ACM. https://doi.org/10.1145/191839.191926
14. Chan, K.-P., & Fu, A. W.-C. (1999). Efficient time series matching by wavelets. In Proceedings of the 15th International Conference on Data Engineering (pp. 126–133). IEEE. https://doi.org/10.1109/ICDE.1999.754915
15. Keogh, E., Chakrabarti, K., Pazzani, M., & Mehrotra, S. (2001). Dimensionality reduction for fast similarity search in large time series databases. Knowledge and Information Systems, 3(3), 263–286. https://doi.org/10.1007/PL00011669
16. Chakrabarti, K., Keogh, E., Mehrotra, S., & Pazzani, M. (2002). Locally adaptive dimensionality reduction for indexing large time series databases. ACM Transactions on Database Systems, 27(2), 188–228. https://doi.org/10.1145/568518.568520
17. Korn, F., Jagadish, H. V., & Faloutsos, C. (1997). Efficiently supporting ad hoc queries in large datasets of time sequences. In Proceedings of the 1997 ACM SIGMOD International Conference on Management of Data (pp. 289–300). ACM. https://doi.org/10.1145/253260.253332
18. Pelkonen, T., Franklin, S., Teller, J., Cavallaro, P., Huang, Q., Meza, J., & DiMare, T. (2015). Gorilla: A fast, scalable, in-memory time series database. Proceedings of the VLDB Endowment, 8(12), 1816–1827. https://doi.org/10.14778/2824032.2824078
19. Andersen, M. P., Kumar, S., & Snoeren, A. C. (2016). BTrDB: Optimizing storage system design for time series processing. In Proceedings of the 14th USENIX Conference on File and Storage Technologies (pp. 23–38). USENIX Association.
20. Jensen, S. K., Pedersen, T. B., & Thomsen, C. (2017). Time series management systems: A survey. IEEE Transactions on Knowledge and Data Engineering, 29(11), 2581–2600. https://doi.org/10.1109/TKDE.2017.2740932
Downloads
Published
Issue
Section
License
Copyright (c) 2023 Artificial Intelligence and Machine Learning Systems

This work is licensed under a Creative Commons Attribution 4.0 International License.