



A pagination technique for efficiently scrolling through large vector database result sets using cursors instead of offsets. Essential for retrieving all vectors in a collection or iterating through search results without performance degradation.
Loading more......
Cursor-based pagination (also called scroll or continuation tokens) efficiently retrieves large result sets from vector databases by using cursors that mark position, avoiding the performance issues of offset-based pagination.
SELECT * FROM vectors LIMIT 100 OFFSET 10000
Issues:
# Qdrant
cursor = None
all_points = []
while True:
result = client.scroll(
collection_name="my_collection",
limit=100,
offset=cursor
)
all_points.extend(result[0]) # Points
cursor = result[1] # Next cursor
if cursor is None: # No more results
break
Not applicable (query pattern/technique).