yumoqing d4e455ba9a perf: optimize get_inference_history query and add indexes
Query optimization (dspy):
- Replace UNION ALL + sort with two parallel queries (asyncio.gather)
  that each use (userid, use_time) composite index
- Python-side merge-sort of two pre-sorted sequences O(n)
- Concurrent FileStorage reads for ioinfo (asyncio.gather)

Indexes (models/*.json + /tmp/llmage_history_indexes.sql):
- llmusage: add idx_llmusage_userid_usetime (userid, use_time)
- llmusage_history: add idx_lh_userid_usetime (userid, use_time)
  (was missing userid index entirely - main bottleneck)
2026-06-05 17:42:15 +08:00
..
2025-08-29 21:29:25 +08:00
2026-05-19 16:21:23 +08:00
2026-05-19 16:12:54 +08:00
2026-03-18 11:40:00 +08:00
2026-05-16 15:14:31 +08:00
2026-05-08 10:54:33 +08:00
2026-04-27 10:41:15 +08:00
2026-04-05 16:02:45 +08:00
2026-04-10 16:48:33 +08:00
2026-03-30 12:04:24 +08:00
2026-05-22 14:28:51 +08:00
2026-03-30 16:07:52 +08:00
2026-03-18 13:42:40 +08:00
2026-03-27 13:20:16 +08:00
2026-04-08 17:28:32 +08:00
2026-03-29 17:28:39 +08:00