🚀 Performance Breakthrough: SQL-Level Filtering
This release delivers dramatic performance improvements for large datasets through SQL-level filtering optimization, addressing issue #374.
🎯 Key Highlights
⚡ 115x Performance Speedup
- Tag filtering: 116ms → 1ms (115x faster at 1,000 memories)
- Time range filtering: 36ms → 0.49ms (74x faster)
- Memory usage: 147MB → 2.5MB (98% reduction at 10,000 memories)
🚀 New Backend Methods
delete_by_tags: Efficient bulk deletion by tagsget_memories_by_time_range: Time-based memory retrieval- Complete performance benchmark suite
🔧 Enhanced API Consistency
- Standardized
delete_by_tagssignature across all backends - Returns 3-tuple
(count, message, deleted_hashes)for audit trail - Improved exception handling and validation
📊 Performance Benchmarks
Tag Filtering
| Memories | Python | SQL | Speedup |
|---|---|---|---|
| 100 | 2.98ms | 0.34ms | 8.7x |
| 500 | 31.55ms | 0.66ms | 48.0x |
| 1000 | 116.23ms | 1.01ms | 115.2x |
Time Range Filtering
| Memories | Python | SQL | Speedup |
|---|---|---|---|
| 100 | 1.89ms | 0.06ms | 32.1x |
| 500 | 12.97ms | 0.29ms | 45.5x |
| 1000 | 36.43ms | 0.49ms | 74.4x |
Memory Usage
| Memories | Python (Peak) | SQL (Peak) | Reduction |
|---|---|---|---|
| 1000 | 14.78 MB | 0.24 MB | 98.4% |
| 5000 | 73.79 MB | 1.24 MB | 98.3% |
| 10000 | 147.57 MB | 2.49 MB | 98.3% |
📦 Installation
pip install --upgrade mcp-memory-service🔗 Related
📝 Full Changelog
See CHANGELOG.md for complete details.
Note: PyPI publishing is handled automatically by GitHub Actions workflow "Publish and Test (Tags)". The package will be available on PyPI within a few minutes.