Selective Experience Replay for Workload Drift Adaptive Query Latency Prediction with Long Short-Term Memory
Authors
Omar Al-Ghanim, Tariq Al-Sowaidi, Matar Al-Ruwais, Hassan Al-FakhroFiles
Abstract
Query latency prediction may be inaccurate if there are alterations in the composition of queries, resource contention or other changes to the execution environment. A long short-term memory framework is introduced in this paper to integrate causal sequence encoding and drift-triggered selective experience replay. A bounded memory stores the corresponding observations and preserves the coverage of the previously observed workload regime. The components of replay priority are prediction residual, feature novelty, and retention value; a constrained update controller separates prediction from model adaptation. The evaluation criteria include prediction accuracy, transition response, historical retention, and adaptation cost. Six workload scenarios, six predictors, five memory budgets and five randomization seeds were employed in the reports. The mean absolute error and the 95th percentile of the absolute error for the proposed predictor in the comparison are 8.8 ms and 28 ms, respectively; those for uniform replay are 11.5 ms and 42 ms. The corresponding reductions are 23.5 per cent and 33.3 per cent. After the abrupt transition, recovery delay decreases from 12 to 7 observation windows, with 1,024 memory slots in the proposed configuration. Sensitivity analysis identifies deterioration under excessive replay and limited memory, while recurrence analysis distinguishes adaptation from retention. A framework is provided to test the stability of latency prediction under varying loads. Comparison links memory allocation to the trade- off between rapid adaptation and retention of older workloads in the face of a limited update budget.
References
Zhu, R., Weng, L., Wei, W., Wu, D., Peng, J., Wang, Y., Ding, B., Lian, D., Zheng, B., & Zhou, J. (2024). PilotScope: Steering databases with machine learning drivers. Proceedings of the VLDB Endowment, 17(5), 980–993.https://doi.org/10.14778/3641204.3641209
Weng, L., Zhu, R., Wu, D., Ding, B., Zheng, B., & Zhou, J. (2024). Eraser: Eliminating performance regression on learned query optimizer. Proceedings of the VLDB Endowment, 17(5), 926–938. https://doi.org/10.14778/3641204.3641205
van Renen, A., Horn, D., Pfeil, P., Vaidya, K., Dong, W., Narayanaswamy, M., Liu, Z., Saxena, G., Kipf, A., & Kraska, T. (2024). Why TPC is not enough: An analysis of the Amazon Redshift fleet. Proceedings of the VLDB Endowment, 17(11), 3694–3706. https://doi.org/10.14778/3681954.3682031
Wu, Z., Markakis, M., Liu, C., Chen, P. B., Narayanaswamy, B., Kraska, T., & Madden, S. (2025). Improving DBMS scheduling decisions with accurate performance prediction on concurrent queries. Proceedings of the VLDB Endowment, 18(11), 4185–4198. https://doi.org/10.14778/3749646.3749686
Ramadan, M., Mokhtar, H. M. O., Sobh, I., & El-Kilany, A. (2025). Towards online training for RL-based query optimizer. International Journal of Data Science and Analytics, 20(3), 2711–2720. https://doi.org/10.1007/s41060-024-00628-4
Wang, L., Zhang, X., Su, H., & Zhu, J. (2024). A comprehensive survey of continual learning: Theory, method and application. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(8), 5362–5383. https://doi.org/10.1109/tpami.2024.3367329
Zhang, X., Chen, Y., Ma, C., Fang, Y., & King, I. (2024). Influential exemplar replay for incremental learning in recommender systems. Proceedings of the AAAI Conference on Artificial Intelligence, 38(8), 9368–9376. https://doi.org/10.1609/aaai.v38i8.28790
Li, J., Azizov, D., Li, Y., & Liang, S. (2024). Contrastive continual learning with importance sampling and prototype-instance relation distillation. Proceedings of the AAAI Conference on Artificial Intelligence, 38(12), 13554–13562. https://doi.org/10.1609/aaai.v38i12.29259
Heinrich, R., Li, X., Luthra, M., & Kaoudi, Z. (2025). Learned cost models for query optimization: From batch to streaming systems. Proceedings of the VLDB Endowment, 18(12), 5482–5487. https://doi.org/10.14778/3750601.3750699
Lyu, C., Lachaud, G., Lozano, G., & Diao, Y. (2025). Graph transformers for query plan representation: Potentials and challenges. Proceedings of the VLDB Endowment, 18(13), 5716–5730. https://doi.org/10.14778/3773731.3773745
Yin, T., Wang, J., Wang, C., Wang, H., Cai, J., Liu, M., Ma, Y., Gao, K., Song, Y., & Shen, W. (2026). R-Tuning: Wavelet-decomposed replay and semantic alignment for continual adaptation of pretrained time-series models. Proceedings of the AAAI Conference on Artificial Intelligence, 40(33), 27870–27878. https://doi.org/10.1609/aaai.v40i33.40010
Lukats, D., Zielinski, O., Hahn, A., & Stahl, F. (2025). A benchmark and survey of fully unsupervised concept drift detectors on real-world data streams. International Journal of Data Science and Analytics, 19(1), 1–31. https://doi.org/10.1007/s41060-024-00620-y
Pasquadibisceglie, V. (2026). Handling concept drifts with traditional process discovery algorithms. Journal of Intelligent Information Systems, 64(1), 179–213. https://doi.org/10.1007/s10844-025-00955-3
Gu, J., Wang, K., Jiang, W., & You, Y. (2024). Summarizing stream data for memory-constrained online continual learning. Proceedings of the AAAI Conference on Artificial Intelligence, 38(11), 12217–12225. https://doi.org/10.1609/aaai.v38i11.29111
Krutsylo, A. (2024). The inter-batch diversity of samples in experience replay for continual learning. Proceedings of the AAAI Conference on Artificial Intelligence, 38(21), 23395–23396. https://doi.org/10.1609/aaai.v38i21.30398
Lim, W. S., Ma, L., Zhang, W., Butrovich, M., Arch, S., & Pavlo, A. (2024). Hit the gym: Accelerating query execution to efficiently bootstrap behavior models for self-driving database management systems. Proceedings of the VLDB Endowment, 17(11), 3680–3693. https://doi.org/10.14778/3681954.3682030
Lai, M., Wulff, S. S., Cao, Y., Robinson, T. J., & Rajapaksha, R. (2025). Temporal cross-validation in forecasting: A case study of COVID-19 incidence using wastewater data. Quality and Reliability Engineering International, 41(2), 672–688. https://doi.org/10.1002/qre.3686
Li, S., Su, T., Zhang, X.-Y., & Wang, Z. (2025). Continual learning with knowledge distillation: A survey. IEEE Transactions on Neural Networks and Learning Systems, 36(6), 9798–9818. https://doi.org/10.1109/tnnls.2024.3476068
Fan, Z., Cai, Y., Dong, S., Yin, Q., Bai, T., Xue, H., Chen, P., Wu, Y., Yang, T., & Cui, B. (2025). Per-flow quantile estimation using M4 framework. IEEE Transactions on Knowledge and Data Engineering, 37(8), 4758–4775. https://doi.org/10.1109/tkde.2025.3573812
Emami, S., & Martínez-Muñoz, G. (2024). Deep learning for multi-output regression using gradient boosting. IEEE Access, 12, 17760–17772. https://doi.org/10.1109/access.2024.3359115
Bates, S., Hastie, T., & Tibshirani, R. (2024). Cross-validation: What does it estimate and how well does it do it? Journal of the American Statistical Association, 119(546), 1434–1445. https://doi.org/10.1080/01621459.2023.2197686
Lehmann, C., Sulimov, P., & Stockinger, K. (2024). Is your learned query optimizer behaving as you expect? A machine learning perspective. Proceedings of the VLDB Endowment, 17(7), 1565–1577. https://doi.org/10.14778/3654621.3654625
Chambers, L., Gaber, M.-M., & Ghomeshi, H. (2025). DeepStreamEnsemble: Streaming adaptation to concept drift in deep neural networks. International Journal of Machine Learning and Cybernetics, 16(5–6), 3955–3976. https://doi.org/10.1007/s13042-024-02492-x
Xu, S., Meng, G., Nie, X., Ni, B., Fan, B., & Xiang, S. (2024). Defying imbalanced forgetting in class incremental learning. Proceedings of the AAAI Conference on Artificial Intelligence, 38(14), 16211–16219. https://doi.org/10.1609/aaai.v38i14.29555
Chen, L., Wu, G., Dong, H., & Hao, K. (2026). A novel adaptive soft sensing framework for label delay in industrial data streams. ISA Transactions, 174, 164–174. https://doi.org/10.1016/j.isatra.2025.09.007
Barnhart, B., Brooker, M., Chinenkov, D., Hooper, T., Im, J., Jha, P. C., Kraska, T., Kurakula, A., Kuznetsov, A., McAlister, G., Muthukrishnan, A., Narayanan, A., Terry, D., Urgaonkar, B., & Yan, J. (2024). Resource management in Aurora Serverless. Proceedings of the VLDB Endowment, 17(12), 4038–4050. https://doi.org/10.14778/3685800.3685825
Tan, J. M., Liao, H., Liu, W., Fan, C., Huang, J., Liu, Z., & Yan, J. (2024). Hyperparameter optimization: Classics, acceleration, online, multi-objective, and tools. Mathematical Biosciences and Engineering, 21(6), 6289–6335. https://doi.org/10.3934/mbe.2024275
Szűcs, G., & Németh, M. (2025). Domino drift effect approach for probability estimation of feature drift in high-dimensional data. Knowledge and Information Systems, 67(5), 4597–4621. https://doi.org/10.1007/s10115-025-02362-0
Kim, J., & Kim, S. (2025). Salient frequency-aware exemplar compression for resource-constrained online continual learning. Proceedings of the AAAI Conference on Artificial Intelligence, 39(17), 17895–17903. https://doi.org/10.1609/aaai.v39i17.33968