Can LLMs Replace the DBA? Evaluating Ontology-Driven Prompting for Relational Database Tuning Tasks

  • Eric Ruas Leão Pontifícia Universidade Católica do Rio de Janeiro (PUC-Rio)
  • Sergio Lifschitz Pontifícia Universidade Católica do Rio de Janeiro (PUC-Rio) https://orcid.org/0000-0003-3073-3734
  • Ana Carolina Almeida Universidade do Estado do Rio de Janeiro (UERJ)
  • Edward Hermann Haeusler Pontifícia Universidade Católica do Rio de Janeiro (PUC-Rio)

Resumo


Relational database tuning traditionally relies on specialized heuristics and expert intuition, making the process difficult to scale, audit, and reproduce. While recent research has explored autonomic and AI-based systems to assist Database Administrators, the emergence of Large Language Models introduces a new paradigm for automated tuning. This paper investigates the extent to which LLMs can augment or replace traditional DBA expertise in complex, knowledge-dependent tuning tasks. We evaluate tuning recommendations generated by two distinct LLMs across three model variants each, comparing zero-shot performance against ontology-driven prompting. Using a PostgreSQL environment with a TPC-H-like workload, we measure the power, throughput, and storage footprint of the recommended structures. Our results indicate that expert knowledge—whether from an experienced DBA or a formal ontology—is not merely a source of domain vocabulary. Ultimately, the ontology acts as a critical precision mechanism that codifies the ’rules of thumb’ inherent to expert tuning, effectively grounding the LLM’s generative capacity and optimizing the trade-off between performance and storage footprint.
Palavras-chave: Relational Database Tuning, Large Language Models, Ontology-Driven Prompting, Automated Database Administration, PostgreSQL, Physical Database Design, Performance Optimization

Referências

Alencar, N., Brayner, A., Monteiro, J. M., and de Aguiar Moraes Filho, J. (2019). Dac-join: A join operator for improving database performance on modern hardware. Concurr. Comput. Pract. Exp., 31(17).

Almeida, A. C., Baião, F., Lifschitz, S., Schwabe, D., and Campos, M. L. M. (2021). Tunocm: A model-driven approach to support database tuning decision making. Decision Support Systems, 145:113538.

Almeida, A. C., Campos, M. L. M., Baião, F., Lifschitz, S., de Oliveira, R. P., and Schwabe, D. (2019). An ontological perspective for database tuning heuristics. In Laender, A. H. F., Pernici, B., Lim, E.-P., and de Oliveira, J. P. M., editors, Conceptual Modeling, pages 240–254, Cham. Springer International Publishing.

Calero, C., Ruiz, F., Baroni, A., e Abreu, F. B., and Piattini, M. (2006). An ontological approach to describe the sql: 2003 object-relational features. Computer Standards & Interfaces, 28(6):695–713.

de Aguiar, C. Z., Falbo, R. A., and Souza, V. E. S. (2018). Ontological Representation of Relational Databases. In Proc. of the 11th Seminar on Ontology Research in Brazil (ONTOBRAS 2018), pages 140–151, São Paulo, SP, Brazil. CEUR.

de Araújo, A. H. M., Monteiro, J. M., de Macêdo, J. A. F., Tavares, J. A., Brayner, A., and Lifschitz, S. (2014). On using an online, automatic and non-intrusive approach for rewriting SQL queries. J. Inf. Data Manag., 5(1):28–39.

Dou, H., Jin, L., Zhou, Y., He, J., Zhang, Y., and Zheng, Z. (2026). Demotuner: Automatic performance tuning for database management systems based on demonstration reinforcement learning.

Fuentes, A. D., Almeida, A. C., de Carvalho Costa, R. L., Braganholo, V., and Lifschitz, S. (2018). Database tuning with partial indexes. In Lóscio, B. F., Dorneles, C. F., and Barioni, M. C. N., editors, XXXIII Simpósio Brasileiro de Banco de Dados, SBBD 2018, Rio de Janeiro, RJ, Brazil, August 25-26, 2018, pages 181–192. SBC.

Giannakouris, V. and Trummer, I. (2025). λ-tune: Harnessing large language models for automated database system tuning. Proc. ACM Manag. Data, 3(1).

Lao, J., Wang, Y., Li, Y., Wang, J., Zhang, Y., Cheng, Z., Chen, W., Tang, M., and Wang, J. (2025). Gptuner: An llm-based database tuning system. ACM SIGMOD Record, 54(1):101–110.

Li, Y., Li, H., Pu, Z., Zhang, J., Zhang, X., Ji, T., Sun, L., Li, C., and Chen, H. (2024). Is large language model good at database knob tuning? a comprehensive experimental evaluation. arXiv preprint arXiv:2408.02213.

Li, Y., Li, H., Zhang, J., Borovica-Gajic, R., Wang, S., Zhang, T., Chen, J., Shi, R., Li, C., and Chen, H. (2025). Agenttune: An agent-based large language model framework for database knob tuning. Proc. ACM Manag. Data, 3(6):1–29.

Liu, F., Wei, R., Wang, H., Ding, Z., Mo, Z., Zhou, K., and Liu, Y. (2026). Arbiter: Towards joint and fine-grained index and partition tuning in analytical databases. Inf. Process. Manag., 63(5).

Metamodel, C. W. (2003). Common warehouse metamodel (cwm) specification. Inc., Needham, MA, USA.

Mozaffari, M., Dignos, A., Gamper, J., and Störl, U. (2024). Self-tuning database systems: A systematic literature review of automatic database schema design and tuning. ACM Computing Surveys, 56(11).

Oliveira, R. P., Baião, F., Machado, J., Almeida, A. C., and Lifschitz, S. (2022). Autonomic combination and selection of tuning actions. In Anais do XXXVII Simpósio Brasileiro de Bancos de Dados (SBBD), pages 39–51.

Ouared, A., Ouhammou, Y., and Roukh, A. (2016). A meta-advisor repository for database physical design. In International Conference on Model and Data Engineering, pages 72–87. Springer.

Perciliano, L. S. S., dos Santos, V., Baião, F., Haeusler, E. H., Lifschitz, S., and Almeida, A. C. (2021). Inferencing relational database tuning actions with ondbtuning ontology. In Anais do XXXVI Simpósio Brasileiro de Bancos de Dados (SBBD), pages 157–168.

Souza, V. A. L. L. and Lifschitz, S. (2022). Tuningchef: an approach for choosing the best cost-benefit database tuning actions. In Anais do XXXVII Simpósio Brasileiro de Bancos de Dados (SBBD).

Wang, X., Wu, W., Narasayya, V., and Chaudhuri, S. (2026). Evaluating the practical effectiveness of llm-driven index tuning with microsoft database tuning advisor.

Wu, Y., Zhou, X., Zhang, Y., and Li, G. (2024). Automatic index tuning: A survey. IEEE Transactions on Knowledge and Data Engineering, 36(12):7657–7676.

Xue, S., Jiang, C., Shi, W., Cheng, F., Chen, K., Yang, H., Zhang, Z., He, J., Zhang, H., Wei, G., Zhao, W., Zhou, F., Qi, D., Yi, H., and Liu, S. (2024). Db-gpt: Large language model meets database. Data Science and Engineering, 9:1–16.

Zhao, X., Zhou, X., and Li, G. (2023). Automatic database knob tuning: A survey. IEEE Transactions on Knowledge and Data Engineering, 35(12):12470–12490.
Publicado
08/09/2026
LEÃO, Eric Ruas; LIFSCHITZ, Sergio; ALMEIDA, Ana Carolina; HAEUSLER, Edward Hermann. Can LLMs Replace the DBA? Evaluating Ontology-Driven Prompting for Relational Database Tuning Tasks. In: SIMPÓSIO BRASILEIRO DE BANCO DE DADOS (SBBD), 41. , 2026, São Carlos/SP. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 331-344. ISSN 2763-8979. DOI: https://doi.org/10.5753/sbbd.2026.249216.