Large Database Optimization
Problem: Memory Exhaustion with Large Databases
// ❌ BAD: This can return 100+ full vCons and exhaust memory
{
"query": "what happened last week",
"limit": 100
}Solution: Smart Response Formatting and Limits
1. Check Database Size First
// Get database size and recommendations
{
"include_recommendations": true
}2. Get Smart Limits for Your Query
3. Use Appropriate Response Formats
Metadata Format (Recommended for Large Databases)
IDs Only Format (For Further Processing)
Snippets Format (For Content Search)
4. Batch Processing for Large Results
5. Use Analytics Tools for Overview
Best Practices
1. Always Check Database Size First
2. Use Metadata Format by Default
3. Use Pagination for Large Results
4. Use Analytics for Patterns
Response Format Comparison
Format
Size
Use Case
Memory Safe
Memory Usage Examples
Summary
Last updated