Skip to content
Open access

SQL Optimization in e-Commerce Platforms Using Large Language Models: A Multi-Pattern Query Empirical Study

Oct 2026 · Journal of Informatics and Web Engineering · 0 citations

TL;DR

Results demonstrate that implementing the LLM's recommended query, indexing, and schema-level changes yielded performance improvements ranging from 43% to 94% across test cases, whereby temporal aggregations yield 89% average improvement while multi-dimensional grouping nets 86% improvement on the whole system.

Abstract

The rapid expansion in e-Commerce domains has presented an unprecedented challenge to database systems that support the execution of complex analytic queries on multi-billion transaction data stream while keeping queries’ response latency under one second. It is commonly observed that Large Language Models (LLMs) are very good at processing natural language queries, rather than struggling with syntax or semantics. This feature is instrumental to various tasks like analytics acceleration, transaction speed-up and handling large workloads across different domains. In this paper, a detailed examination of how LLMs can be employed as intelligent assistants for Structure Query Language (SQL) query optimization throughout eight different types of query patterns is performed (with two test cases each, resulting in 16 test cases). An in-depth experimental study is carried out among three main database systems (PostgreSQL 16, MariaDB ColumnStore, and SQLite) with relevant real-world e-Commerce datasets such as Brazilian e-Commerce Public Dataset and Synthetic e-Commerce Relational Dataset ranging from 10 million to 1 billion records. Our methodology of sixteen test-cases includes temporal aggregations, multi-dimensional grouping, ranking queries, window functions, complex joins, full-text search, recursive queries and geospatial analysis. Results demonstrate that implementing the LLM's recommended query, indexing, and schema-level changes yielded performance improvements ranging from 43% to 94% across test cases, whereby temporal aggregations yield 89% average improvement while multi-dimensional grouping nets 86% improvement on the whole system.

Read PDF

Similar papers

#artificial intelligence Preprint Oct 2026

Same Query, Different Answer: Run-to-Run Variance in Semantic Query Processing

Semantic query engines ask a large language model (LLM) to judge individual rows, and benchmarks compare these engines on the quality of a few executions at temperature 0. We measure how much another execution changes. We re-execute the text and tabular workloads of SemBench, LRO-Bench, and UDA-Bench through their own...

Oktie Hassanzadeh, D. Subramanian · 0 citations
#small language model Open access Oct 2026

Commerce core: Low-Budget Multitask Adaptation for Structured E-Commerce Queries

Small language models offer a practical way to convert shopping queries into ex-ecutable constraints, but partial extraction accuracy can obscure whether the com-plete request is represented correctly. We study CommerceCore, a Qwen3-1.7B model adapted with QLoRA on 2,130 examples spanning entity segmentation, query con...

Mukherjee Arghya · 0 citations
#natural language process... Preprint Oct 2026

AptMQL-Bench: From Text-to-SQL to Text-to-MQL via Access-Pattern Schema Design and Data-Preserving Migration

A conversion pipeline is proposed, driven by coding agents with human-in-the-loop verification, that designs each document schema from expected access patterns and rewrites queries to be MongoDB-native, and builds an access-pattern-based text-to-MQL benchmark (AptMQL-Bench).

Hy Nguyen, Nabi Rezvani, Robin Vujanic · 0 citations
Open access Sep 2026

LLM and MCP driven e-commerce assistant over graph databases

An architecture for conversational e-commerce that integrates large language models, Model Context Protocol servers, and a Neo4j graph database to enable natural language product discovery is presented.

Andrii Baran, I. Spivak, S. Krepych · 0 citations
Open access Sep 2026

A Data Science and Business Intelligence Framework for Large-Scale E-Commerce Analytics Using Embedded Databases

The exponential growth of e-commerce transaction data demands scalable, efficient, and reproducible analytical frameworks capable of transforming raw transactional records into actionable business intelligence. This study proposes a novel five-layer Data Science and Business Intelligence (DS-BI) framework integrating e...

Afef Gueidi · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.