LightRAG/lightrag
Yasiru Rangana 8a72135a32 Optimize PostgreSQL initialization performance
- Batch index existence checks into single query (16+ queries -> 1 query)
- Batch timestamp column checks into single query (8 queries -> 1 query)
- Batch field length checks into single query (5 queries -> 1 query)

Performance improvement: ~70-80% faster initialization (35s -> 5-10s)

Key optimizations:
1. check_tables(): Use ANY($1) to check all indexes at once
2. _migrate_timestamp_columns(): Batch all column type checks
3. _migrate_field_lengths(): Batch all field definition checks

All changes are backward compatible with no schema or API changes.
Reduces database round-trips by batching information_schema queries.

(cherry picked from commit 2f22336ace)
2025-12-04 19:09:00 +08:00
..
api Add offline deployment support with cache management and layered deps 2025-12-04 19:07:09 +08:00
evaluation Update .env loading and add API authentication to RAG evaluator 2025-12-04 19:04:25 +08:00
kg Optimize PostgreSQL initialization performance 2025-12-04 19:09:00 +08:00
llm Add offline deployment support with cache management and layered deps 2025-12-04 19:07:09 +08:00
models tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
services tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
tools Add offline deployment support with cache management and layered deps 2025-12-04 19:07:09 +08:00
__init__.py Bump core version to 1.4.9.1 2025-09-28 15:25:02 +08:00
base.py tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
constants.py Fix logging message formatting 2025-12-04 19:08:46 +08:00
exceptions.py
lightrag.py Add doc_name field to full docs storage 2025-12-04 19:05:14 +08:00
namespace.py tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
operate.py Fix logging message formatting 2025-12-04 19:08:46 +08:00
prompt.py Improve prompt clarity by standardizing terminology and formatting 2025-09-28 13:31:55 +08:00
rerank.py
security.py tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
tenant_rag_manager.py tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
types.py
utils.py Fix logging filter logic 2025-09-26 19:42:33 +08:00
utils_context.py tests: stabilize integration tests + skip external services; fix multi-tenant API behavior and idempotency (#4) 2025-12-04 16:04:21 +08:00
utils_graph.py