Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Tampilan VECTOR_INDEXES
Tampilan INFORMATION_SCHEMA.VECTOR_INDEXES berisi satu baris untuk setiap indeks
vektor dalam set data.
Izin yang diperlukan
Untuk melihat metadata indeks vektor, Anda memerlukan izin Identity and Access Management (IAM) bigquery.tables.get atau bigquery.tables.list pada tabel dengan indeks. Setiap peran IAM yang telah ditetapkan berikut menyertakan setidaknya salah satu izin ini:
Saat Anda membuat kueri tampilan INFORMATION_SCHEMA.VECTOR_INDEXES, hasil kueri akan berisi satu baris untuk setiap indeks vektor dalam set data.
Tampilan INFORMATION_SCHEMA.VECTOR_INDEXES memiliki skema berikut:
Nama kolom
Jenis data
Nilai
index_catalog
STRING
Nama project yang berisi set data.
index_schema
STRING
Nama set data yang berisi indeks.
table_name
STRING
Nama tabel tempat indeks dibuat.
index_name
STRING
Nama indeks vektor.
index_status
STRING
Status indeks: ACTIVE, PENDING
DISABLEMENT, TEMPORARILY DISABLED, atau PERMANENTLY DISABLED.
ACTIVE berarti indeks dapat digunakan atau sedang dibuat. Lihat coverage_percentage
untuk melihat progres pembuatan indeks.
PENDING DISABLEMENT berarti ukuran total tabel yang diindeks melebihi batas organisasi Anda; indeks dimasukkan ke dalam antrean untuk dihapus. Dalam status ini, indeks dapat digunakan dalam kueri penelusuran vektor dan Anda akan dikenai biaya untuk penyimpanan indeks vektor.
TEMPORARILY DISABLED berarti ukuran total tabel yang diindeks melebihi batas organisasi Anda, atau tabel yang diindeks lebih kecil dari 10 MB. Selama dalam status ini, indeks tidak digunakan dalam kueri penelusuran vektor dan Anda tidak akan dikenai biaya untuk penyimpanan indeks vektor.
PERMANENTLY DISABLED berarti ada perubahan skema yang tidak kompatibel pada tabel yang diindeks.
creation_time
TIMESTAMP
Waktu pembuatan indeks.
last_modification_time
TIMESTAMP
Terakhir kali konfigurasi indeks diubah. Misalnya, menghapus kolom yang diindeks.
last_refresh_time
TIMESTAMP
Terakhir kali data tabel diindeks. Nilai NULL berarti indeks belum tersedia.
disable_time
TIMESTAMP
Waktu status indeks ditetapkan ke DISABLED. Nilainya adalah NULL jika status indeks bukan DISABLED.
disable_reason
STRING
Alasan indeks dinonaktifkan. NULL jika status indeks bukan DISABLED.
DDL
STRING
Pernyataan bahasa definisi data (DDL) yang digunakan untuk membuat
indeks.
coverage_percentage
INTEGER
Perkiraan persentase data tabel yang telah diindeks.
0% berarti indeks tidak dapat digunakan dalam kueri VECTOR_SEARCH,
meskipun beberapa data telah diindeks.
unindexed_row_count
INTEGER
Jumlah baris dalam tabel yang belum diindeks.
total_logical_bytes
INTEGER
Jumlah byte logis yang dapat ditagih untuk indeks.
total_storage_bytes
INTEGER
Jumlah byte penyimpanan yang dapat ditagih untuk indeks.
Cakupan dan sintaksis
Kueri terhadap tampilan ini harus memiliki penentu set data. Tabel
berikut menjelaskan cakupan wilayah untuk tampilan ini:
Opsional: PROJECT_ID: ID project Google Cloud Anda. Jika tidak ditentukan, project default akan digunakan.
DATASET_ID: ID set data Anda. Untuk mengetahui informasi selengkapnya, lihat Penentu set data.
Contoh
-- Returns metadata for vector indexes in a single dataset.SELECT*FROMmyDataset.INFORMATION_SCHEMA.VECTOR_INDEXES;
Contoh
Contoh berikut menunjukkan semua indeks vektor aktif pada tabel dalam set data
my_dataset, yang terletak di project my_project. Contoh ini mencakup nama indeks, pernyataan DDL yang digunakan untuk membuatnya, dan persentase cakupannya. Jika
tabel dasar yang diindeks kurang dari 10 MB, indeksnya tidak terisi, dan dalam
hal ini nilai coverage_percentage adalah 0.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.VECTOR_INDEXES\u003c/code\u003e view provides metadata for each vector index within a dataset, with each row representing a unique index.\u003c/p\u003e\n"],["\u003cp\u003eAccessing vector index metadata requires \u003ccode\u003ebigquery.tables.get\u003c/code\u003e or \u003ccode\u003ebigquery.tables.list\u003c/code\u003e IAM permissions, which are included in several predefined roles such as \u003ccode\u003eroles/bigquery.admin\u003c/code\u003e and \u003ccode\u003eroles/bigquery.dataViewer\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVECTOR_INDEXES\u003c/code\u003e schema includes details like \u003ccode\u003eindex_name\u003c/code\u003e, \u003ccode\u003eindex_status\u003c/code\u003e (\u003ccode\u003eACTIVE\u003c/code\u003e, \u003ccode\u003ePENDING DISABLEMENT\u003c/code\u003e, \u003ccode\u003eTEMPORARILY DISABLED\u003c/code\u003e, or \u003ccode\u003ePERMANENTLY DISABLED\u003c/code\u003e), \u003ccode\u003ecreation_time\u003c/code\u003e, \u003ccode\u003ecoverage_percentage\u003c/code\u003e, and the \u003ccode\u003eDDL\u003c/code\u003e statement used to create the index.\u003c/p\u003e\n"],["\u003cp\u003eQueries on this view must include a dataset qualifier and the query execution location must match the region of the \u003ccode\u003eINFORMATION_SCHEMA\u003c/code\u003e view.\u003c/p\u003e\n"],["\u003cp\u003eAn index might not be populated if the indexed base table is less than 10MB, in which case the \u003ccode\u003ecoverage_percentage\u003c/code\u003e is 0, meaning it is not usable.\u003c/p\u003e\n"]]],[],null,["# VECTOR_INDEXES view\n===================\n\nThe `INFORMATION_SCHEMA.VECTOR_INDEXES` view contains one row for each vector\nindex in a dataset.\n\nRequired permissions\n--------------------\n\nTo see [vector index](/bigquery/docs/vector-index) metadata, you need the\n`bigquery.tables.get` or `bigquery.tables.list` Identity and Access Management (IAM)\npermission on the table with the index. Each of the following predefined\nIAM roles includes at least one of these permissions:\n\n- `roles/bigquery.admin`\n- `roles/bigquery.dataEditor`\n- `roles/bigquery.dataOwner`\n- `roles/bigquery.dataViewer`\n- `roles/bigquery.metadataViewer`\n- `roles/bigquery.user`\n\nFor more information about BigQuery permissions, see\n[Access control with IAM](/bigquery/docs/access-control).\n\nSchema\n------\n\nWhen you query the `INFORMATION_SCHEMA.VECTOR_INDEXES` view, the query results contain one row for each vector index in a dataset.\n\n\u003cbr /\u003e\n\nThe `INFORMATION_SCHEMA.VECTOR_INDEXES` view has the following schema:\n\nScope and syntax\n----------------\n\nQueries against this view must have a [dataset qualifier](/bigquery/docs/information-schema-intro#syntax). The\nfollowing table explains the region scope for this view:\n\n\u003cbr /\u003e\n\nReplace the following:\n\n- Optional: \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project. If not specified, the default project is used.\n- \u003cvar translate=\"no\"\u003eDATASET_ID\u003c/var\u003e: the ID of your dataset. For more information, see [Dataset qualifier](/bigquery/docs/information-schema-intro#dataset_qualifier).\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | **Note:** You must use [a region qualifier](/bigquery/docs/information-schema-intro#region_qualifier) to query `INFORMATION_SCHEMA` views. The location of the query execution must match the region of the `INFORMATION_SCHEMA` view.\n\n\u003cbr /\u003e\n\n**Example** \n\n -- Returns metadata for vector indexes in a single dataset.\n SELECT * FROM myDataset.INFORMATION_SCHEMA.VECTOR_INDEXES;\n\nExample\n-------\n\nThe following example shows all active vector indexes on tables in the dataset\n`my_dataset`, located in the project `my_project`. It includes their names, the\nDDL statements used to create them, and their coverage percentage. If an\nindexed base table is less than 10 MB, then its index is not populated, in\nwhich case the `coverage_percentage` value is 0. \n\n```googlesql\nSELECT table_name, index_name, ddl, coverage_percentage\nFROM my_project.my_dataset.INFORMATION_SCHEMA.VECTOR_INDEXES\nWHERE index_status = 'ACTIVE';\n```\n\nThe result is similar to the following: \n\n```\n+------------+------------+-------------------------------------------------------------------------------------------------+---------------------+\n| table_name | index_name | ddl | coverage_percentage |\n+------------+------------+-------------------------------------------------------------------------------------------------+---------------------+\n| table1 | indexa | CREATE VECTOR INDEX `indexa` ON `my_project.my_dataset.table1`(embeddings) | 100 |\n| | | OPTIONS (distance_type = 'EUCLIDEAN', index_type = 'IVF', ivf_options = '{\"num_lists\": 100}') | |\n+------------+------------+-------------------------------------------------------------------------------------------------+---------------------+\n| table2 | indexb | CREATE VECTOR INDEX `indexb` ON `my_project.my_dataset.table2`(vectors) | 42 |\n| | | OPTIONS (distance_type = 'COSINE', index_type = 'IVF', ivf_options = '{\"num_lists\": 500}') | |\n+------------+------------+-------------------------------------------------------------------------------------------------+---------------------+\n| table3 | indexc | CREATE VECTOR INDEX `indexc` ON `my_project.my_dataset.table3`(vectors) | 98 |\n| | | OPTIONS (distance_type = 'DOT_PRODUCT', index_type = 'TREE_AH', | |\n| | | tree_ah_options = '{\"leaf_node_embedding_count\": 1000, \"normalization_type\": \"NONE\"}') | |\n+------------+------------+-------------------------------------------------------------------------------------------------+---------------------+\n```"]]