Slow queries to fetch all objects

Hi @kathleenb45,

If you are only interested in UUIDs, you can specify which properties you would like to get back, and or even request to not return any properties to make the request smaller, like this:

Iterator

collection = client.collections.get("WineReview")

for item in collection.iterator(return_properties=["name", "description"])
    print(item.uuid, item.properties)

for item in collection.iterator(return_properties="") #no properties
    print(item.uuid, item.properties) # item properties will return {}

Fetch

result = collection.query.fetch_objects(
    limit=5,
    return_properties=""
)
1 Like