perf: keep source aggregation off interactive requests

This commit is contained in:
ImBenji
2026-08-04 21:48:44 +01:00
parent d020fa3811
commit 6e666838ba
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ try {
(SELECT COUNT(*) FROM article_embedding_meta WHERE embedded_at >= datetime('now', '-1 hour')) AS contentPerHour
`).get();
const bySource = db.prepare(`
SELECT source, COUNT(*) AS n FROM articles GROUP BY source ORDER BY n DESC
SELECT DISTINCT source FROM articles ORDER BY source
`).all();
// Avoid scanning the 3.7 GB article table for legacy content-status values.
// Readiness is the useful operational distinction and is available from the