Skip to content

Best Practices

Follow these guidelines to get the most out of Gilial.

Always create a backup before compressing:

Terminal window
# With Pinecone CLI or console
# Create a snapshot or export your index data

If possible, test compression on a copy of your index first.

Run compression during off-peak hours:

  • Lower query load
  • Less disruption
  • Easier to rollback if needed
  • What vectors do you have?
  • How old is your oldest vector?
  • What’s your typical query pattern?
# Always preview
preview = client.compress(strategy="balanced", dry_run=True)
print(f"Would save: {preview.savings_pct}%")
# Then apply
result = client.compress(strategy="balanced", dry_run=False)
  • Begin with Balanced strategy
  • Graduate to Aggressive after you’re comfortable
  • Check compression status
  • Watch for any errors
  • Keep logs for reference
# Check new index size
status = client.get_status()
print(f"New vector count: {status['total_vector_count']}")
  • Run sample queries before and after
  • Measure query latency
  • Check relevance of results

Track over time:

  • Storage usage
  • Query latency
  • Index size
  • Cost trends
  • Always use dry-run first
  • Maintain backups
  • Test on non-critical indexes
  • Run during off-peak hours
  • Start with Balanced strategy
  • Document compression runs
  • Monitor query performance
  • Skip dry-run mode
  • Compress production without backup
  • Use Aggressive on critical data
  • Ignore query latency changes
  • Compress frequently (vectors need time to accumulate)
  • Forget to verify results
  • It’s normal for large indexes (10k+ vectors)
  • Consider compressing during off-peak hours
  • Break into smaller batches if needed
  • Your index may be well-optimized already
  • Try again after accumulating more vectors
  • Consider Aggressive strategy if safe to do
  • Revert to previous backup
  • Use more conservative strategy next time
  • Consider compression less frequently
  • Weekly - Monitor index growth
  • Monthly - Run dry-run analysis
  • Quarterly - Apply compression if savings > 2%
  • Yearly - Review compression strategy

Adjust based on your vector accumulation rate and budget.