2a2f32401a
- Fix NGX_URL in huiwings htyproc.env (remove /api/ngx suffix) - Add #[serde(default)] to AiScorePayload::compare_url - Add dbtask indexes (status_created, updated_at) for task processing perf - Add CLAUDE.md with server mappings and deployment rules - Ignore test-results/ Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
548 B
SQL
11 lines
548 B
SQL
-- BTREE index on (task_status, created_at DESC) for one_pending_task query:
|
|
-- SELECT ... FROM dbtask WHERE task_status = 'PENDING' ORDER BY created_at DESC LIMIT 1
|
|
-- Also benefits all_tasks_page and zombie detection filtered by status.
|
|
CREATE INDEX IF NOT EXISTS idx_dbtask_status_created
|
|
ON dbtask (task_status, created_at DESC);
|
|
|
|
-- BTREE index on updated_at for zombie detection:
|
|
-- SELECT ... FROM dbtask WHERE updated_at < cutoff AND task_status IN (...)
|
|
CREATE INDEX IF NOT EXISTS idx_dbtask_updated_at
|
|
ON dbtask (updated_at);
|