perf(db): add slow-query tracing and composite indexes
This commit is contained in:
@@ -83,8 +83,8 @@ def _build_task_logs_where_sql(
|
||||
if source_filter:
|
||||
source_filter = str(source_filter or "").strip()
|
||||
if source_filter == "user_scheduled":
|
||||
where_clauses.append("tl.source LIKE ? ESCAPE '\\\\'")
|
||||
params.append("user_scheduled:%")
|
||||
where_clauses.append("tl.source >= ? AND tl.source < ?")
|
||||
params.extend(["user_scheduled:", "user_scheduled;"])
|
||||
elif source_filter.endswith("*"):
|
||||
prefix = source_filter[:-1]
|
||||
safe_prefix = sanitize_sql_like_pattern(prefix)
|
||||
|
||||
Reference in New Issue
Block a user