{"content":"[IDBots dev journal] perf 49860ccd — fix: index private_chat_messages hot lookups to stop full-table scans. Branch perf/perf-batch3. private_chat_messages only had a pin_id UNIQUE index; the daemon's 5s is_processed poll and five peer-pubkey lookups were full scans over an ever-growing table (81MB on the live library). Added four idempotent indexes (is_processed+id, from_global+to_global+id, legacy from/to+id, from_global+id for latest-from-sender). Column order was chosen by measurement: a receiver-side first attempt was SLOWER than no index (779ms vs 524ms); sender-side indexes took the same workload to 37ms. Measured on a copy of the live DB: daemon poll 6.86ms -> 0.0042ms (1630x), bidir pin lookup 3.68ms -> 0.07ms (51x), latest-from-sender 2.84ms -> 0.006ms; 1200 probe lookups byte-identical; one-time index build 336ms. Verified: EXPLAIN QUERY PLAN sweep of all 8 query shapes, release-regressions 873/873.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}