値を大きくすると再現率は高くなりますが、QPS は低くなります。並べ替えを無効にするには、この値を 0 に設定します。インデックスの作成時に PCA が有効になっていない場合、デフォルトは 0 です。それ以外の場合は、デフォルトは 50 x K です。ここで、K はクエリで指定された LIMIT です。
クエリ ランタイム (省略可)
scann.num_search_threads
マルチスレッド検索の検索スレッド数。これにより、レイテンシの影響を受けやすいアプリケーションで ScaNN ANN 検索に複数のスレッドを使用することで、単一クエリのレイテンシを短縮できます。データベースがすでに CPU バウンドになっている場合、この設定では単一クエリのレイテンシは改善されません。デフォルト値は 2 です。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eThis page provides detailed reference information regarding the tuning parameters for the ScaNN Index.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003emax_num_levels\u003c/code\u003e, \u003ccode\u003enum_leaves\u003c/code\u003e, and \u003ccode\u003equantizer\u003c/code\u003e parameters are used during index creation and can be adjusted for optimal performance based on the size of the vector dataset.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003escann.enable_pca\u003c/code\u003e parameter, enabled by default, uses Principal Component Analysis to reduce embedding size, but can be disabled if recall deteriorates.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003escann.num_leaves_to_search\u003c/code\u003e, \u003ccode\u003escann.pre_reordering_num_neighbors\u003c/code\u003e, and \u003ccode\u003escann.num_search_threads\u003c/code\u003e are query runtime parameters that impact the trade-off between recall and QPS, and can be adjusted based on application requirements.\u003c/p\u003e\n"],["\u003cp\u003eAdjusting the \u003ccode\u003enum_leaves\u003c/code\u003e parameter when creating an index can create a more fine-grained index, improving recall and query performance at the cost of longer index creation times.\u003c/p\u003e\n"]]],[],null,["# ScaNN Index reference\n\nSelect a documentation version: Current (16.8.0)keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/reference/scann-index-reference)\n- [16.8.0](/alloydb/omni/16.8.0/docs/reference/scann-index-reference)\n- [16.3.0](/alloydb/omni/16.3.0/docs/reference/scann-index-reference)\n- [15.12.0](/alloydb/omni/15.12.0/docs/reference/scann-index-reference)\n- [15.7.1](/alloydb/omni/15.7.1/docs/reference/scann-index-reference)\n- [15.7.0](/alloydb/omni/15.7.0/docs/reference/scann-index-reference)\n\n\u003cbr /\u003e\n\nThis page provides reference material for the ScaNN Index.\n\n\u003cbr /\u003e\n\nTuning parameters\n-----------------\n\nThe following index parameters and database flags are used together to find the right balance of recall and QPS.\n\nOption type Index creation Query runtime \n\nWhat's next\n-----------\n\n- [Get started with vector embeddings using AlloyDB AI](https://codelabs.developers.google.com/alloydb-ai-embedding#0)."]]