Cover the eyes-open subquery with an index
The people filter was served from faces_image without touching a row; reading the eye columns in the same subquery touched every one, and ALTER TABLE had put those seven floats after the embedding and the crop blob. One count took 24 seconds on the reference library, thirteen of them system time. faces_eyes covers the subquery again: five milliseconds.
This commit is contained in:
@@ -1403,6 +1403,12 @@ the honest answer is "everything". A test drives the same five readings through
|
||||
through `state()` and requires the two to agree, so the badge and the grid cannot say different
|
||||
things.
|
||||
|
||||
**And an index, learned the slow way.** The people filter was always served from a covering index
|
||||
on `faces(image_id)`; the moment its subquery read the eye columns it had to read the face *row*,
|
||||
and `ALTER TABLE ADD COLUMN` had put those seven floats after the embedding and the crop blob —
|
||||
six kilobytes to reach every one. One count took 24 seconds on the reference library, thirteen of
|
||||
them system time. `faces_eyes` (schema V17) covers the subquery again: five milliseconds.
|
||||
|
||||
### 17.4 What the sample says about accuracy, and what it does not
|
||||
|
||||
The 60-proxy sample above was run at proxy resolution, where the production pass reads the native
|
||||
|
||||
Reference in New Issue
Block a user