# The space complexity of vector indexes in LibSQL

DevFeed: [The space complexity of vector indexes in LibSQL](<https://devfeed.tech/articles/the-space-complexity-of-vector-indexes-in-libsql-6047.md>)

Original publisher: [Read original article](<https://turso.tech/blog/the-space-complexity-of-vector-indexes-in-libsql>)

Author: Volodymyr Pavlyshyn

Published: 2024-10-03T00:00:00Z

Content type: article

Language: en

Sources: [Turso Blog](<https://devfeed.tech/sources/turso-blog.md>)

Topics: [libSQL](<https://devfeed.tech/topics/libsql.md>), [ann](<https://devfeed.tech/topics/ann.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [Compression](<https://devfeed.tech/topics/compression.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Database](<https://devfeed.tech/topics/database.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [ann](<https://devfeed.tech/tags/ann.md>), [compression](<https://devfeed.tech/tags/compression.md>), [env-file-security](<https://devfeed.tech/tags/env-file-security.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [latency](<https://devfeed.tech/tags/latency.md>), [libsql](<https://devfeed.tech/tags/libsql.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [storage](<https://devfeed.tech/tags/storage.md>), [vector](<https://devfeed.tech/tags/vector.md>)

## AI overview

This article examines the storage complexity of libSQL vector indexes based on the graph-based FreshDiskANN algorithm. It explains how graph storage and neighbor vectors increased a database from 3.5 MB to 50 MB, then discusses compression and max-neighbor settings for reducing space while balancing search speed and accuracy.

## Source excerpt

How Kin shrunk libSQL's LM-DiskANN vector index storage on mobile by tuning compress_neighbors and max_neighbors, trading a little recall for big space wins.