feat: add user_id index to profiles table for faster lookups
The profiles table previously lacked an index on the user_id column, causing full table scans during user lookups. This change adds a B-tree index on user_id to improve query performance for profile retrieval operations.
This commit is contained in:
@@ -155,6 +155,7 @@ def write_reports(
|
||||
started: datetime,
|
||||
finished: datetime,
|
||||
cost: Optional[dict[str, Any]] = None,
|
||||
incomplete: bool = False,
|
||||
) -> dict[str, Any]:
|
||||
REPORTS_DIR.mkdir(parents=True, exist_ok=True)
|
||||
items = findings()
|
||||
@@ -166,6 +167,7 @@ def write_reports(
|
||||
"mode": mode,
|
||||
"started_at": started.isoformat(),
|
||||
"finished_at": finished.isoformat(),
|
||||
"incomplete": incomplete,
|
||||
"summary": summary,
|
||||
"cost": cost or {},
|
||||
"findings": items,
|
||||
|
||||
Reference in New Issue
Block a user