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

qdrant-indexing-performance-optimization

它能做什么

这个工具可以帮你找出并解决让 Qdrant 数据索引和写入变得非常缓慢的问题,并提出调整建议,以加快数据上传和搜索。

适用场景

  • ✓当上传数据到 Qdrant 耗时过长时。
  • ✓当索引优化过程卡住或耗时过多时。
  • ✓当 HNSW 索引(一种用于快速搜索的索引类型)的构建非常缓慢时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/qdrant-performance-optimization/indexing-performance-optimization/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“我的 Qdrant 索引速度非常慢,我该怎么办?”

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

工作原理

这个工具会分析问题出在你的电脑或网络上,还是出在 Qdrant 服务器上。然后建议你分批上传数据,并调整 Qdrant 的配置,比如分片(shards)数量和索引策略,以加快整个过程。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

What to Do When Qdrant Indexing Is Too Slow

Qdrant does NOT build HNSW indexes immediately. Small segments use brute-force until they exceed indexing_threshold_kb (default: 20 MB). Search during this window is slower by design, not a bug.

Uploads/Ingestion Too Slow

Use when: upload or upsert API calls are slow. Identify bottleneck: client-side (network, batching) vs server-side (CPU, disk I/O)

For client-side, optimize batching and parallelism:

  • Use batch upserts (64-256 points per request) Points API
  • Use 2-4 parallel upload streams

For server-side, optimize Qdrant configuration and indexing strategy:

  • Create more shards (3-12), each shard has an independent update worker Sharding
  • Create payload indexes before HNSW builds (needed for filterable vector index) Payload index

Suitable for initial bulk load of large datasets:

  • Disable HNSW during bulk load (set indexing_threshold_kb very high, restore after) Collection params
  • Setting m=0 to disable HNSW is legacy, use high indexing_threshold_kb instead

Careful, fast unindexed upload might temporarily use more RAM and degrade search performance until optimizer catches up.

See https://search.qdrant.tech/md/documentation/tutorials-develop/bulk-upload/

Optimizer Stuck or Taking Too Long

Use when: optimizer running for hours, not finishing.

  • Check actual progress via optimizations endpoint (v1.17+) Optimization monitoring
  • Large merges and HNSW rebuilds legitimately take hours on big datasets
  • Check CPU and disk I/O (HNSW is CPU-bound, merging is I/O-bound, HDD is not viable)
  • If optimizer_status shows an error, check logs for disk full or corrupted segments

HNSW Build Time Too High

Use when: HNSW index build dominates total indexing time.

HNSW index for multi-tenant collections

If you have a multi-tenant use case where all data is split by some payload field (e.g. tenant_id), you can avoid building a global HNSW index and instead rely on payload_m to build HNSW index only for subsets of data. Skipping global HNSW index can significantly reduce indexing time.

See Multi-tenant collections for details.

Additional Payload Indexes Are Too Slow

Qdrant builds extra HNSW links for all payload indexes to ensure that quality of filtered vector search does not degrade. Some payload indexes (e.g. text fields with long texts) can have a very high number of unique values per point, which can lead to long HNSW build time.

You can disable building extra HNSW links for specific payload index and instead rely on slightly slower query-time strategies like ACORN.

Read more about disabling extra HNSW links in documentation

Read more about ACORN in documentation

What NOT to Do

  • Do not create payload indexes AFTER HNSW is built (breaks filterable vector index)
  • Do not use m=0 for bulk uploads into an existing collection, it might drop the existing HNSW and cause long reindexing
  • Do not upload one point at a time (per-request overhead dominates)
常见问题

为什么数据在建立索引时搜索会变慢?

Qdrant 不会立即构建 HNSW 索引。对于较小的数据块,它会使用更简单、更快的方法,但这样搜索会更慢。当数据量达到一定规模或完成优化后,情况就会改变。

分片(shards)是什么?它有什么作用?

分片可以理解为数据的划分。分片越多,Qdrant 就能并行处理更新和索引,从而加快整体进度。

应该在 HNSW 之前还是之后创建 payload 索引(载荷索引)?

建议先创建 payload 索引(与数据关联的附加信息的索引),再构建 HNSW 索引。这样可以确保过滤搜索正常工作,也能优化总的索引时间。

详情

作者的原始描述

Diagnoses and fixes slow Qdrant indexing and data ingestion. Use when someone reports 'uploads are slow', 'indexing takes forever', 'optimizer is stuck', 'HNSW build time too long', or 'data uploaded but search is bad'. Also use when optimizer status shows errors, segments won't merge, or indexing threshold questions arise.

repo: github/awesome-copilot

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能