跳到正文
Skillpedia
数据库40k · #7371

qdrant-scaling-query-volume

它能做什么

这份指南可以帮你优化 Qdrant 在大数据量下的查询性能。它建议了一种更高效的方式来获取大量结果,避免系统过载。

适用场景

  • ✓当一次查询返回的结果过多时。
  • ✓如果搜索结果的分页性能很慢。
  • ✓当需要获取大量条目或向量时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-query-volume/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-query-volume/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“当我需要大量结果时,如何让 Qdrant 的搜索更快?”

每周 5 个新技能,1 分钟读完。

工作原理

它不再要求每个数据分片都返回完整的 limit 数量,而是为每个分片请求一个经过计算的较小数量。然后,它再智能地把这些部分结果合并起来。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

常见问题

用这种方法会漏掉一些结果吗?

有非常小的概率会漏掉个别结果,但损失很小,与其他本身就会带来轻微误差的搜索方法相当。

什么时候会应用这项优化?

当存在多个数据分片(shard),查询请求的结果数量超过 128,并且不是精确搜索时,就会启用这项优化。

它的主要好处是什么?

主要好处是大幅减少了数据分片之间传输的数据量,让高 limit 的查询更快、更高效。

详情

作者的原始描述

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'.

repo: github/awesome-copilot

热度

GitHub 星标
40k
排名
#7371
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能