34047007@qq.com
8f11b571d8
fix: 生产高级搜索 500 — 预算超时降级 + pub_date 排序索引 + affiliations_text trgm 反范式列
- count/主查询独立短预算,超时降级不再 500:count 超时返回 _COUNT_CAP(10 万+)
而非 0(修复"找到 0 条结果"、分页被隐藏),主查询超时降级空结果
- 年份筛选改用 pub_date 范围,主查询 ORDER BY pub_date DESC NULLS LAST, id DESC
走新索引 ix_gl_pub_date_sort(Index Scan,替代 Parallel Seq Scan + Sort,89.5 万行 40s→<0.2s)
- affiliations_text 反规范化列 + gin_trgm 索引 + 触发器维护,替换 7 处 jsonb lateral
EXISTS(病理查询慢 ~40x);存量由 scripts/backfill_affiliations.py 分批后台回填
- ATM 门控 _has_structured_terms:结构化查询(含字段标签)的 plain 词不做 MeSH 展开,
修复 "lung neoplasms[MAJR]+年份" count 5s + main 6s 双超时(11.72s→2.02s)
- query_expansion/mesh IN(subquery) 去显式 DISTINCT(百万级 id 集合物化排序)
- alembic env 改 connect()(transaction_per_migration 每迁移独立事务,支持迁移内分批提交)
2026-08-10 21:48:42 +08:00
..
2026-07-27 07:59:18 +08:00
2026-07-28 11:02:29 +08:00
2026-08-10 21:48:42 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-28 11:02:29 +08:00
2026-07-27 07:59:18 +08:00
2026-07-28 11:02:29 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 11:19:10 +08:00
2026-07-27 07:59:18 +08:00
2026-07-28 11:02:29 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-29 08:24:28 +08:00
2026-07-27 08:35:12 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 07:59:18 +08:00
2026-08-10 16:30:43 +08:00
2026-08-10 00:33:16 +08:00
2026-08-10 16:30:43 +08:00
2026-07-27 07:59:18 +08:00
2026-07-27 08:35:12 +08:00