Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite finden Sie eine Liste der Spanner APIs, die Spanner Data Boost unterstützen, und eine Anleitung zum Aufrufen von Beispielcode, der Data Boost verwendet. Mit Data Boost können Sie große Analyseabfragen nahezu ohne Auswirkungen auf vorhandene Arbeitslasten auf der bereitgestellten Spanner-Instanz ausführen.
Hinweis
Das Hauptkonto (z. B. das Dienstkonto), über das die Anwendung ausgeführt wird, muss die IAM-Berechtigung (Identity and Access Management) spanner.databases.useDataBoost haben. Weitere Informationen finden Sie unter Zugriffssteuerung mit IAM.
APIs
Für partitionierte Lesevorgänge mit Data Boost können Sie Data Boost für die folgenden Spanner APIs aktivieren:
Wir empfehlen, ExecuteStreamingSql und streamingRead in Ihren Anwendungen zu verwenden, da ExecuteSql und read in ihren Antworten auf 10 MB Daten beschränkt sind.
Beispielcode
Beispiele für die Verwendung von Data Boost in Ihrem Anwendungscode finden Sie unter Daten parallel lesen.
Apache Spark SQL Connect für Google Cloud Spanner
Der Apache Spark SQL-Connector für Google Cloud Spanner unterstützt das Lesen von Google Cloud Spanner-Tabellen in die DataFrames von Spark mithilfe der Spanner Java-Bibliothek. Weitere Informationen zum Apache Spark SQL-Connector finden Sie unter Apache Spark SQL-Connector für Google Cloud Spanner.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-17 (UTC)."],[],[],null,["# Use Data Boost in your applications\n\nThis page lists the Spanner APIs that support Spanner Data Boost and explains how to view sample code that uses Data Boost. With Data Boost, you can run large analytic queries with near-zero impact to existing workloads on the provisioned Spanner instance.\n\n\u003cbr /\u003e\n\nBefore you begin\n----------------\n\nEnsure that the principal (for example, the service account) that runs the\napplication has the\n`spanner.databases.useDataBoost` Identity and Access Management (IAM)\npermission. For more information, see\n[Access control with IAM](../iam).\n\nAPIs\n----\n\nFor partitioned reads with Data Boost, the following\nSpanner APIs have an option to enable Data Boost:\n\n- `ExecuteSql` [RPC](/spanner/docs/reference/rpc/google.spanner.v1#google.spanner.v1.Spanner.ExecuteSql) \\| [REST](/spanner/docs/reference/rest/v1/projects.instances.databases.sessions/executeSql)\n- `ExecuteStreamingSql` [RPC](/spanner/docs/reference/rpc/google.spanner.v1#google.spanner.v1.Spanner.ExecuteStreamingSql) \\| [REST](/spanner/docs/reference/rest/v1/projects.instances.databases.sessions/executeStreamingSql)\n- `read` [RPC](/spanner/docs/reference/rpc/google.spanner.v1#google.spanner.v1.Spanner.Read) \\| [REST](/spanner/docs/reference/rest/v1/projects.instances.databases.sessions/read)\n- `streamingRead` [RPC](/spanner/docs/reference/rpc/google.spanner.v1#google.spanner.v1.Spanner.StreamingRead) \\| [REST](/spanner/docs/reference/rest/v1/projects.instances.databases.sessions/streamingRead)\n\nWe recommend that you use `ExecuteStreamingSql` and `streamingRead` in your\napplications, because `ExecuteSql` and `read` are limited to 10 MB of\ndata in their responses.\n\nSample code\n-----------\n\nFor examples of using Data Boost in your application code, see\n[Read data in parallel](../reads#read_data_in_parallel).\n\nApache Spark SQL Connect for Google Cloud Spanner\n-------------------------------------------------\n\nThe Apache Spark SQL Connector for Google Cloud Spanner supports\nreading Google Cloud Spanner tables into Spark's DataFrames using\nthe Spanner Java library. For more information about the Apacha\nSpark SQL Connector, see [Apache Spark SQL connector for Google Cloud Spanner](https://github.com/GoogleCloudDataproc/spark-spanner-connector).\n\nWhat's next\n-----------\n\n- Learn about Data Boost in [Data Boost overview](/spanner/docs/databoost/databoost-overview).\n- [Monitor Data Boost usage](/spanner/docs/databoost/databoost-monitor)\n- [Monitor and manage Data Boost quota usage](/spanner/docs/databoost/databoost-quotas)"]]