Currently Listening's list takes 1.3 s to answer #249

Closed
opened 2026-10-15 08:24:53 -07:00 by rays · 1 comment
Owner

GET /api/entries?filter=in_progress&limit=50 answered in 1.32 s on 2026-10-15 (curl through ipx-web, 1 KB answer), where All Subscriptions takes about 0.1 s. #248 now fetches it ahead, so it is seldom waited for, but the query or what surrounds it is slow: EXPLAIN (ANALYZE, BUFFERS) the in_progress filter's SQL on production and read its trace.

GET /api/entries?filter=in_progress&limit=50 answered in 1.32 s on 2026-10-15 (curl through ipx-web, 1 KB answer), where All Subscriptions takes about 0.1 s. #248 now fetches it ahead, so it is seldom waited for, but the query or what surrounds it is slow: EXPLAIN (ANALYZE, BUFFERS) the in_progress filter's SQL on production and read its trace.
rays added the enhancement label 2026-10-15 08:24:53 -07:00
Author
Owner

Fixed in 6fde4b7, deployed in ipx 1.2.1-dev: the in-progress and pinned filters say s.position > 5 and s.flagged instead of coalesce(...), which kept Postgres from seeing that a match needs a row of entry_state, so it scanned all 574,000 items (74,733 blocks read). EXPLAIN on production: 970 ms to 2.2 ms, pinned 32 to 2.3. Live through ipx-web: Currently Listening 1.32 s to 27 ms, same answer. every_filter_works_with_and_without_a_search_term passes on Postgres and SQLite.

Fixed in 6fde4b7, deployed in ipx 1.2.1-dev: the in-progress and pinned filters say s.position > 5 and s.flagged instead of coalesce(...), which kept Postgres from seeing that a match needs a row of entry_state, so it scanned all 574,000 items (74,733 blocks read). EXPLAIN on production: 970 ms to 2.2 ms, pinned 32 to 2.3. Live through ipx-web: Currently Listening 1.32 s to 27 ms, same answer. every_filter_works_with_and_without_a_search_term passes on Postgres and SQLite.
rays closed this issue 2026-10-15 08:28:58 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#249