Bridging the Indexing Gap: Empirical Evaluation of Application-Side Optimisation Techniques for Native Vector Search in MySQL 9.0
DOI:
https://doi.org/10.14738/ejas.1403.6884Keywords:
MySQL, Vector Search, Database Optimisation, RAG, High-Dimensional DataAbstract
The integration of vector similarity search into relational database management systems has become important for applications built around Retrieval-Augmented Generation. MySQL 9.0 introduces a native VECTOR data type, but the Community Edition still lacks server-side vector indexes and native distance functions, forcing similarity search to rely on a client-side full-scan model. This paper evaluates the practical consequences of that design through experiments on synthetic datasets of up to 10^5 vectors, together with a SIFT1M validation and small-scale sentence-embedding checks. The study focuses on where time is spent during execution by separating the costs of transfer, parsing, and computation. Results show that native binary VECTOR storage substantially improves data-handling efficiency over JSON-based storage, achieving up to 5.9x lower end-to-end latency in the tested settings, and that the dominant bottleneck shifts toward data movement as scale and dimensionality grow. Two established deployment strategies are then assessed. Hybrid Search, which combines scalar B-Tree filtering with vector ranking, achieves up to 54x speedup when selective metadata predicates are available. A two-pass strategy based on Principal Component Analysis (PCA) reduces transfer volume and achieves up to a 15.5x speedup for high-dimensional workloads, though its recall depends on the compression setting and data domain. Additional tests show that Hybrid Search is the most stable option under modest concurrency. The paper concludes with a practical decision framework for choosing between native VECTOR storage, scalar pre-filtering, PCA compression, and migration to a system with native approximate nearest-neighbour execution.
References
A. Vaswani et al., ‘Attention is all you need’, Adv. Neural Inf. Process. Syst., vol. 30, 2017.
P. Lewis et al., ‘Retrieval-augmented generation for knowledge-intensive nlp tasks’, Adv. Neural Inf. Process. Syst., vol. 33, pp. 9459–9474, 2020.
W. Fan et al., ‘A survey on rag meeting llms: Towards retrieval-augmented large language models’, in Proceedings of the 30th ACM SIGKDD conference on knowledge discovery and data mining, 2024, pp. 6491–6501.
Z. Jing, Y. Su, and Y. Han, ‘When large language models meet vector databases: A survey’, in 2025 Conference on Artificial Intelligence x Multimedia (AIxMM), IEEE, 2025, pp. 7–13.
N. Reimers and I. Gurevych, ‘Sentence-bert: Sentence embeddings using siamese bertnetworks’, ArXiv Prepr. ArXiv190810084, 2019.
J. Wang et al., ‘Milvus: A purpose-built vector data management system’, in Proceedings of the 2021 international conference on management of data, 2021, pp. 2614–2627.
Y. Han, C. Liu, and P. Wang, ‘A comprehensive survey on vector database: Storage and retrieval technique, challenge’, ArXiv Prepr. ArXiv231011703, 2023.
P. J. Sadalage and M. Fowler, NoSQL distilled: a brief guide to the emerging world of polyglot persistence. Pearson Education, 2013.
A. Kane, ‘pgvector: Open-source vector similarity search for PostgreSQL’. 2024. [Online]. Available: https://github.com/pgvector/pgvector
PlanetScale Inc., ‘Vector search and storage’. 2024. [Online]. Available: https://planetscale.com/docs/vitess/vectors
C. Wei et al., ‘Analyticdb-v: A hybrid analytical engine towards query fusion for structured and unstructured data’, Proc. VLDB Endow., vol. 13, no. 12, pp. 3152–3165, 2020.
Google Cloud, ‘Cloud SQL for MySQL: Vector Search’. 2024. [Online]. Available: https://cloud.google.com/sql/docs/mysql/vector-search
Oracle Corporation, ‘MySQL 9.0 Reference Manual: The VECTOR Type’. 2024. [Online]. Available: https://dev.mysql.com/doc/refman/9.0/en/vector.html
Oracle, ‘MySQL HeatWave Vector: Integrated Vector Store for Generative AI’. 2024. [Online]. Available: https://www.oracle.com/a/ocom/docs/mysql-heatwave-technical-brief.pdf
A. Guttman, ‘R-trees: A dynamic index structure for spatial searching’, in Proceedings of the 1984 ACM SIGMOD international conference on Management of data, 1984, pp. 47–57.
J. L. Bentley, ‘Multidimensional binary search trees used for associative searching’, Commun. ACM, vol. 18, no. 9, pp. 509–517, 1975.
P. Indyk and R. Motwani, ‘Approximate nearest neighbors: towards removing the curse of dimensionality’, in Proceedings of the thirtieth annual ACM symposium on Theory of computing, 1998, pp. 604–613.
R. Weber, H.-J. Schek, and S. Blott, ‘A quantitative analysis and performance study for similarity-search methods in high-dimensional spaces’, in VLDB, 1998, pp. 194–205.
K. Beyer, J. Goldstein, R. Ramakrishnan, and U. Shaft, ‘When is “nearest neighbor” meaningful?’, in International conference on database theory, Springer, 1999, pp. 217–235.
A. Gionis, P. Indyk, R. Motwani, and others, ‘Similarity search in high dimensions via hashing’, in Vldb, 1999, pp. 518–529. Scholar Publishing
H. Jegou, M. Douze, and C. Schmid, ‘Product quantization for nearest neighbor search’, IEEE Trans. Pattern Anal. Mach. Intell., vol. 33, no. 1, pp. 117–128, 2010.
R. Guo et al., ‘Accelerating large-scale inference with anisotropic vector quantization’, in International Conference on Machine Learning, PMLR, 2020, pp. 3887–3896.
Y. A. Malkov and D. A. Yashunin, ‘Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs’, IEEE Trans. Pattern Anal. Mach. Intell., vol. 42, no. 4, pp. 824–836, 2018.
Y. Malkov, A. Ponomarenko, A. Logvinov, and V. Krylov, ‘Approximate nearest neighbor algorithm based on navigable small world graphs’, Inf. Syst., vol. 45, pp. 61–68, 2014.
S. Jayaram Subramanya, F. Devvrit, H. V. Simhadri, R. Krishnawamy, and R. Kadekodi, ‘Diskann: Fast accurate billion-point nearest neighbor search on a single node’, Adv. Neural Inf. Process. Syst., vol. 32, 2019.
Q. Chen et al., ‘SPANN: Highly-efficient Billionscale Approximate Nearest Neighbor Search. CoRR abs/2111.08566 (2021)’, ArXiv Prepr. ArXiv211108566, 2021.
C. Mohan, D. Haderle, B. Lindsay, H. Pirahesh, and P. Schwarz, ‘ARIES: A transaction recovery method supporting fine-granularity locking and partial rollbacks using write-ahead logging’, ACM Trans. Database Syst. TODS, vol. 17, no. 1, pp. 94–162, 1992.
C. Zhan et al., ‘AnalyticDB: real-time OLAP database system at Alibaba cloud’, Proc. VLDB Endow., vol. 12, no. 12, pp. 2059–2070, 2019.
R. Ramakrishnan, J. Gehrke, and J. Gehrke, Database management systems, vol. 3. McGraw-Hill New York, 2003.
B. Schwartz, P. Zaitsev, and V. Tkachenko, High performance MySQL: optimization, backups, and replication. O’Reilly Media, Inc., 2012.
E. J. O’neil, P. E. O’neil, and G. Weikum, ‘The LRU-K page replacement algorithm for database disk buffering’, Acm Sigmod Rec., vol. 22, no. 2, pp. 297–306, 1993.
M. Stonebraker, ‘SQL databases v. NoSQL databases’, Commun. ACM, vol. 53, no. 4, pp. 10–11, 2010.
I. Jolliffe, ‘Principal component analysis’, in International encyclopedia of statistical science, Springer, 2011, pp. 1094–1096.
S. Dasgupta and A. Gupta, ‘An elementary proof of a theorem of Johnson and Lindenstrauss’, Random Struct. Algorithms, vol. 22, no. 1, pp. 60–65, 2003.
A. Kusupati et al., ‘Matryoshka representation learning’, Adv. Neural Inf. Process. Syst., vol. 35, pp. 30233–30249, 2022.
M. Aumüller, E. Bernhardsson, and A. Faithfull, ‘ANN-Benchmarks: A benchmarking tool for approximate nearest neighbor algorithms’, Inf. Syst., vol. 87, p. 101374, 2020.
W. Felter, A. Ferreira, R. Rajamony, and J. Rubio, ‘An updated performance comparison of virtual machines and linux containers’, in 2015 IEEE international symposium on performance analysis of systems and software (ISPASS), IEEE, 2015, pp. 171–172.
J. Johnson, M. Douze, and H. Jégou, ‘Billion-scale similarity search with GPUs’, IEEE Trans. Big Data, vol. 7, no. 3, pp. 535–547, 2019.
M. Douze et al., ‘The faiss library’, IEEE Trans. Big Data, 2025.
J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, ‘Bert: Pre-training of deep bidirectional transformers for language understanding’, in Proceedings of the 2019 conference of the Scholar Publishing North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers), 2019, pp. 4171–4186.
A. Neelakantan et al., ‘Text and code embeddings by contrastive pre-training’, ArXiv Prepr. ArXiv220110005, 2022.
R. Bayer and E. McCreight, ‘Organization and maintenance of large ordered indices’, in Proceedings of the 1970 ACM SIGFIDET (Now SIGMOD) Workshop on Data Description, Access and Control, 1970, pp. 107–141.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 European Journal of Applied Sciences

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