From d0c486a019f23c2dec4699c98d28fbed7970f820 Mon Sep 17 00:00:00 2001 From: Luke VanderHart Date: Fri, 2 Aug 2024 10:51:11 -0400 Subject: [PATCH 1/3] add indexes to metadata columns --- chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql diff --git a/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql b/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql new file mode 100644 index 00000000000..52bf53a50ea --- /dev/null +++ b/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql @@ -0,0 +1,3 @@ +CREATE INDEX IF NOT EXISTS embedding_metadata_int_value ON embedding_metadata (key, int_value) WHERE int_value IS NOT NULL; +CREATE INDEX IF NOT EXISTS embedding_metadata_float_value ON embedding_metadata (key, float_value) WHERE float_value IS NOT NULL; +CREATE INDEX IF NOT EXISTS embedding_metadata_string_value ON embedding_metadata (key, string_value) WHERE string_value IS NOT NULL; From e3abf701f93476f3d9db1d84a38786a664cda838 Mon Sep 17 00:00:00 2001 From: Luke VanderHart Date: Thu, 15 Aug 2024 14:09:56 -0400 Subject: [PATCH 2/3] whitespace change to trigger CI --- chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql b/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql index 52bf53a50ea..1dbe5639426 100644 --- a/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql +++ b/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql @@ -1,3 +1,3 @@ CREATE INDEX IF NOT EXISTS embedding_metadata_int_value ON embedding_metadata (key, int_value) WHERE int_value IS NOT NULL; CREATE INDEX IF NOT EXISTS embedding_metadata_float_value ON embedding_metadata (key, float_value) WHERE float_value IS NOT NULL; -CREATE INDEX IF NOT EXISTS embedding_metadata_string_value ON embedding_metadata (key, string_value) WHERE string_value IS NOT NULL; +CREATE INDEX IF NOT EXISTS embedding_metadata_string_value ON embedding_metadata (key, string_value) WHERE string_value IS NOT NULL; From 83c0bb76fab20c7d38d0df73a086b23a8f7398ac Mon Sep 17 00:00:00 2001 From: Luke VanderHart Date: Thu, 15 Aug 2024 14:11:29 -0400 Subject: [PATCH 3/3] Fix trailing whitespace for linter --- chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql b/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql index 1dbe5639426..52bf53a50ea 100644 --- a/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql +++ b/chromadb/migrations/metadb/00004-metadata-indices.sqlite.sql @@ -1,3 +1,3 @@ CREATE INDEX IF NOT EXISTS embedding_metadata_int_value ON embedding_metadata (key, int_value) WHERE int_value IS NOT NULL; CREATE INDEX IF NOT EXISTS embedding_metadata_float_value ON embedding_metadata (key, float_value) WHERE float_value IS NOT NULL; -CREATE INDEX IF NOT EXISTS embedding_metadata_string_value ON embedding_metadata (key, string_value) WHERE string_value IS NOT NULL; +CREATE INDEX IF NOT EXISTS embedding_metadata_string_value ON embedding_metadata (key, string_value) WHERE string_value IS NOT NULL;