Skip to content

fix(admin): speed up request model search#479

Merged
mylukin merged 1 commit into
mainfrom
codex/admin-request-model-search-perf
Jul 6, 2026
Merged

fix(admin): speed up request model search#479
mylukin merged 1 commit into
mainfrom
codex/admin-request-model-search-perf

Conversation

@mylukin

@mylukin mylukin commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a generated model_search column for admin request model/lane keyword filtering
  • add SQLite/Postgres admin-window indexes so model= scans small indexed text instead of per-row decision_json paths
  • bump version to 0.25.12 and document the performance decision

Live diagnosis

  • reproduced /admin/api/requests?page=1&pageSize=50&model=fable&key_id=9ed9480f-519b-4350-85d5-3640a7071e5f&start=1783180800000&end=1783267200000
  • before fix: TTFB ~5.26s, total ~5.65s
  • production SQLite narrowed to 7,922 rows via key/date index, but COUNT still spent ~2.36s parsing JSON paths for model search

Verification

  • pnpm exec vitest run packages/core/src/store/sqlite/schema.test.ts
  • pnpm exec vitest run packages/core/src/store/postgres/migrate.test.ts
  • pnpm exec vitest run packages/core/src/store/sqlite/telemetry.test.ts packages/core/src/store/store-contract.test.ts
  • pnpm exec vitest run packages/core/src/store/sqlite/memory-dedup-migrate.test.ts packages/core/src/store/sqlite/memory-schema.test.ts packages/core/src/store/sqlite/oauth-quota-migrate.test.ts packages/core/src/store/sqlite/oauth-usage-migrate.test.ts
  • pnpm test -> 5196 passed
  • pnpm typecheck
  • pnpm lint
  • pnpm build

Co-Authored-By: Codex <noreply@openai.com>
@mylukin mylukin force-pushed the codex/admin-request-model-search-perf branch from 495c14e to 1261464 Compare July 6, 2026 12:55
@mylukin mylukin merged commit bd22c52 into main Jul 6, 2026
3 checks passed
@mylukin mylukin deleted the codex/admin-request-model-search-perf branch July 6, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant