---
name: Qdrant Query Scaling
slug: qdrant-query-scaling
category: DevOps
description: Qdrant Query Scaling guides how to reduce cross-shard work for large limits and offsets in auto-sharded searches. Use it when queries return too many results, paginate large result sets, or fetch many vectors.
github: "https://github.com/qdrant/skills/tree/main/skills/qdrant-scaling/scaling-query-volume"
language: Python
stars: 230
forks: 28
install: "npx degit https://github.com/qdrant/skills/tree/main/skills/qdrant-scaling/scaling-query-volume ~/.claude/skills/scaling-query-volume"
installs_to: ~/.claude/skills/scaling-query-volume
source_path: skills/qdrant-scaling/scaling-query-volume/SKILL.md
collection_size: 25
category_size: 868
collection_url: "https://dirskills.com/collections/qdrant/skills"
added: 2026-09-03T06:04:30.096Z
last_synced: 2026-09-03T06:04:30.096Z
canonical_url: "https://dirskills.com/skills/qdrant-query-scaling"
---

# Qdrant Query Scaling

Qdrant Query Scaling guides how to reduce cross-shard work for large limits and offsets in auto-sharded searches. Use it when queries return too many results, paginate large result sets, or fetch many vectors.

**Install:**

```bash
npx degit https://github.com/qdrant/skills/tree/main/skills/qdrant-scaling/scaling-query-volume ~/.claude/skills/scaling-query-volume
```

## README

# Scaling for Query Volume

Problem: When a query has a large limit (e.g. 1000) and there are multiple shards (e.g. 10), naively each shard must return the full 1000 results — totaling 10,000 scored points transferred and merged. This is wasteful since data is randomly distributed across auto-shards.

## Core idea

Instead of asking every shard for the full limit, ask each shard for a smaller limit computed via Poisson distribution statistics, then merge. This is safe because auto-sharding guarantees random, independent data distribution.

## When it activates

- More than 1 shard
- Auto-sharding is in use (all queried shards share the same shard key)
- The request's limit + offset >= SHARD_QUERY_SUBSAMPLING_LIMIT (128)
- The query is not exact

## Key tradeoff

 The strategy trades a small probability of slightly incomplete results for a large reduction in inter-shard data transfer, especially for high-limit queries across many shards. The 1.2x safety factor and the 99.9% Poisson threshold keep the error rate very low — comparable to inaccuracies already introduced by approximate vector indices like HNSW.
