Commit 87147b6
authored
perf(recall): stop materializing the unused embedding BLOB in entity SELECTs (#231)
The recall, get, timeline, and dense-hydrate SELECTs all listed the embedding
column, but entity_from_row never reads it (it skips that position and sets
embedding: None). So every returned row materialized and copied the ~1.5 KB
embedding BLOB off the page cache only to discard it: ~15 KB per default
limit-10 recall, up to ~1.5 MB for limit-1000 browse/list calls.
Project NULL in that column position instead of the stored BLOB. The column
position is preserved so entity_from_row's positional indices are unchanged;
dense_search's phase-1 `SELECT id, embedding` scan (which actually needs the
vector) is untouched. Behavior is identical; existing recall/get/timeline
tests confirm no column misalignment.
Closes #2291 parent 455b1d9 commit 87147b6
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | | - | |
| 777 | + | |
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| |||
1402 | 1402 | | |
1403 | 1403 | | |
1404 | 1404 | | |
1405 | | - | |
| 1405 | + | |
1406 | 1406 | | |
1407 | 1407 | | |
1408 | 1408 | | |
| |||
1602 | 1602 | | |
1603 | 1603 | | |
1604 | 1604 | | |
1605 | | - | |
| 1605 | + | |
1606 | 1606 | | |
1607 | 1607 | | |
1608 | 1608 | | |
| |||
2270 | 2270 | | |
2271 | 2271 | | |
2272 | 2272 | | |
2273 | | - | |
| 2273 | + | |
2274 | 2274 | | |
2275 | 2275 | | |
2276 | 2276 | | |
| |||
2305 | 2305 | | |
2306 | 2306 | | |
2307 | 2307 | | |
2308 | | - | |
| 2308 | + | |
2309 | 2309 | | |
2310 | 2310 | | |
2311 | 2311 | | |
| |||
3072 | 3072 | | |
3073 | 3073 | | |
3074 | 3074 | | |
3075 | | - | |
| 3075 | + | |
3076 | 3076 | | |
3077 | 3077 | | |
3078 | 3078 | | |
| |||
0 commit comments