mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-16 21:20:53 +08:00
Adds scripts/sql/20261115-task-query-indexes.sql (CREATE INDEX CONCURRENTLY on activity(tool_use_id) WHERE kind = tool_result and on llm_usage((COALESCE(task_id, "")), model) with covering columns, then VACUUM (ANALYZE) llm_usage), its rollback and a README. CI applies and rolls back both scripts. Backported from #209 (contributed by @renaesop).
7 lines
307 B
SQL
Executable File
7 lines
307 B
SQL
Executable File
\set ON_ERROR_STOP on
|
|
-- Removes only the two indexes introduced by this change; retains table data.
|
|
SET lock_timeout = '5s';
|
|
SET statement_timeout = '10min';
|
|
DROP INDEX CONCURRENTLY IF EXISTS public.idx_activity_tool_result_lookup;
|
|
DROP INDEX CONCURRENTLY IF EXISTS public.idx_llm_usage_task_model_tokens;
|