You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* vector blobs are usually pretty huge (more than a page size, for example, node block for 1024d f32 embeddings with 1bit compression will occupy ~20KB)
532
+
* in this case, main table B-Tree takes on redundant shape where all leaf nodes has only 1 cell
533
+
*
534
+
* as we have a query which selects random row using OFFSET/LIMIT trick - we will need to read all these leaf nodes pages just to skip them
535
+
* so, in order to remove this overhead for random row selection - we creating an index with just single column used
536
+
* in this case B-Tree leafs will be full of rowids and the overhead for page reads will be very small
537
+
*/
538
+
zSql=sqlite3MPrintf(
539
+
db,
540
+
"CREATE INDEX IF NOT EXISTS \"%w\".%s_shadow_idx ON %s_shadow (%s)",
0 commit comments