asg017 / sqlite-vss

A SQLite extension for efficient vector search, based on Faiss!
MIT License
1.59k stars 58 forks source link

Source Embeddings JSON & Virtual Table Cleanup? #86

Open metaskills opened 11 months ago

metaskills commented 11 months ago

So assuming I follow the pattern where I create a embeddings column. Can those "source" columns be cleaned up afterward? For example, can I delete the articles.embedding column after this operation?

INSERT INTO vss_articles(ROWID, embedding) SELECT ROWID, embedding FROM articles
metaskills commented 11 months ago

FWIW, I did this and it seems to work really well. Thoughts?

db.exec('UPDATE articles SET embedding = NULL');
db.exec('VACUUM')