perf(scripts/session-stats): added composite index on tool call timestamp and name

- Added a composite index `ss_tc_ts_tool` on the `timestamp` and `tool_name` columns of the `ss_tool_calls` table to optimize query performance.
This commit is contained in:
can1357
2026-06-30 07:01:32 +02:00
parent b704ac698a
commit 467f46b190
+1
View File
@@ -96,6 +96,7 @@ CREATE TABLE IF NOT EXISTS ss_tool_calls (
UNIQUE(session_file, call_id, seq)
);
CREATE INDEX IF NOT EXISTS ss_tc_tool_ts ON ss_tool_calls(tool_name, timestamp);
CREATE INDEX IF NOT EXISTS ss_tc_ts_tool ON ss_tool_calls(timestamp, tool_name);
CREATE INDEX IF NOT EXISTS ss_tc_sess_seq ON ss_tool_calls(session_file, seq);
CREATE TABLE IF NOT EXISTS ss_tool_results (