Database / Weaviate Vector database Interview questions
What is Object TTL in Weaviate?
Object Time-to-Live (TTL) is a lifecycle management feature that automatically expires and removes objects from a collection once a configured amount of time has passed, without an application needing to run its own scheduled cleanup job to delete stale data.
client.collections.create( name="SessionEvents", inverted_index_config=Configure.inverted_index( # TTL configured per-collection ), ) # objects inserted with a TTL are automatically removed once expired
This is particularly useful for data with an inherently limited useful lifetime, like session events, temporary caches, or time-sensitive logs, where keeping expired data around indefinitely would just waste storage and search resources without providing any ongoing value, and where a manually maintained deletion job would otherwise be one more piece of application infrastructure to build and operate.
More Related questions...