Can LLMs substitute SQL? Comparing Resource Utilization of Querying LLMs versus Traditional Relational Databases
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) can automate or substitute different types of tasks in the software engineering process. This study evaluates the resource utilization and accuracy of LLM in interpreting and executing natural language queries against traditional SQL within relational database management systems. We empirically examine the resource utilization and accuracy of nine LLMs varying from 7 to 34 Billion parameters, including Llama2 7B, Llama2 13B, Mistral, Mixtral, Optimus-7B, SUS-chat-34B, platypus-yi-34b, NeuralHermes-2.5-Mistral-7B and Starling-LM-7B-alpha, using a small transaction dataset. Our findings indicate that using LLMs for database queries incurs significant energy overhead (even small and quantized models), making it an environmentally unfriendly approach. Therefore, we advise against replacing relational databases with LLMs due to their substantial resource utilization.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 10 of its 22 references that are in the map. First posted on arXiv 12 Apr 2024.
Builds on
10 of 22 references.
References · 10
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2022Training Compute-Optimal Large Language Modelscited by 2,927
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
- 2023Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergycited by 343
- 2023Fine-tuning Language Models for Factualitycited by 219
- 2023Power Hungry Processing: Watts Driving the Cost of AI Deployment?cited by 186
- 2023From Words to Watts: Benchmarking the Energy Costs of Large Language Model Inferencecited by 168
- 2022Measuring the Carbon Intensity of AI in Cloud Instancescited by 110
- 2023Making AI Less "Thirsty": Uncovering and Addressing the Secret Water Footprint of AI Modelscited by 44
- 2022Forecasting SQL Query Cost at Twittercited by 5
Built on by
Citing papers per year: 2024: 1; 2025: 1.
2 papers.