Qdrant Scaling Query Volume

作者 qdrant6a03d0ce8f55无许可证收录于 2026年10月8日更新于 2026年10月8日

Guides Qdrant query volume scaling. Use when someone asks 'query returns too many results', 'scroll performance', 'large limit values', 'paginating search results', 'fetching many vectors', or 'high cardinality results'.

AI 生成的概览

说明 Qdrant 如何通过基于泊松分布的二次采样来扩展跨分片的大 limit 查询。

功能
该技能为 Qdrant 在查询使用较大 limit 且涉及多个分片时的查询量扩展提供指导。它说明如何让每个分片返回一个用泊松分布统计计算出的较小 limit,再合并结果,而不是向每个分片请求完整 limit。它还说明了该策略的激活条件,以及在结果可能略微不完整与减少分片间数据传输之间的权衡。
适用场景
当有人询问查询返回结果过多、scroll 性能、较大的 limit 值、搜索结果分页、获取大量向量或高基数结果时使用。它适用于多分片、启用自动分片且非精确的查询,且 limit 加 offset 达到二次采样阈值的情况。
运行要求
不需要脚本或工具,仅为说明性指令。

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.

来源与署名

来源:qdrant/skills位于skills/qdrant-scaling/scaling-query-volume提交6a03d0c

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架