Pour acheter des emplacements, vous devez disposer d'un quota d'emplacements suffisant pour la région dans laquelle vous souhaitez effectuer l'achat d'emplacements.
Si votre quota d'emplacements pour la région souhaitée est inférieur au nombre d'emplacements que vous voulez acheter, consultez la section Demander une augmentation du quota.
Créer une réservation d'autoscaling
Créez une réservation nommée prod dans l'emplacement multirégional US et attribuez-lui un maximum de 100 emplacements d'autoscaling.
Dans la console Google Cloud , accédez à la page BigQuery.
Attribuez un projet à la réservation prod. Toutes les tâches de requête exécutées à partir de ce projet utilisent le nombre d'emplacements de la réservation prod. (Dans ce tutoriel, vous n'exécutez pas de tâche.)
Vous pouvez attribuer n'importe quel projet situé dans la même organisation et la même région que le projet d'administration dans lequel vous avez créé la réservation
Dans la console Google Cloud , accédez à la page BigQuery.
Dans le menu de navigation, cliquez sur Gestion de la capacité.
Cliquez sur l'onglet Réservations d'emplacements.
Dans la colonne Actions de la réservation nommée prod, cliquez sur more_vertActions.
Cliquez sur Créer une attribution.
Dans la section Sélectionner une organisation, un dossier ou un projet, cliquez sur Parcourir.
Recherchez le projet, puis sélectionnez-le.
Cliquez sur Créer.
Lorsque vous créez une attribution de réservation, attendez au moins cinq minutes avant d'exécuter une requête. Sinon, la requête risque d'être facturée au tarif à la demande.
In the project list, select the project that you
want to delete, and then click Delete.
In the dialog, type the project ID, and then click
Shut down to delete the project.
Supprimer la réservation
Lorsque vous supprimez une réservation, toutes les tâches en cours d'exécution avec des emplacements de cette réservation échouent. Pour éviter les erreurs, exécutez les tâches en cours de transfert avant de supprimer la réservation.
Dans la console Google Cloud , accédez à la page BigQuery.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis guide explains how to create, assign, and delete BigQuery reservations, which allow you to manage your query workloads and costs.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, you must enable the BigQuery Reservation API, have an adequate slot quota, and consider reading the introduction to workload management for fundamental concepts.\u003c/p\u003e\n"],["\u003cp\u003eCreating a reservation involves defining a reservation name, region, and the maximum number of autoscaling slots, using the console or alternatively SQL or bq tool.\u003c/p\u003e\n"],["\u003cp\u003eYou can assign a project to a reservation, ensuring queries from that project use the reserved slots and prevent on-demand pricing, but you must wait at least 5 minutes before running a query after assignment.\u003c/p\u003e\n"],["\u003cp\u003eTo avoid incurring charges, you can either delete the project entirely or delete the specific reservation after ensuring that all associated jobs are complete.\u003c/p\u003e\n"]]],[],null,["Get started with reservations Learn how to create a reservation, assign a reservation, and delete\na reservation in BigQuery.\n| **Caution:** This tutorial incurs charges. The autoscaling slots are only billed while they are scaled up. You can delete the reservation at the end of this tutorial. Before purchasing the slots, understand the [pricing](/bigquery/pricing#capacity_compute_analysis_pricing).\n\nYou can also purchase a commitment. For more information, see\n[Slot commitments](/bigquery/docs/reservations-workload-management#slot_commitments).\n| **Note:** To avoid additional charges after you complete the tutorial, make sure to follow the steps in [Clean up](#clean-up).\n\nBefore you start this tutorial, consider reading\n[Introduction to workload management](/bigquery/docs/reservations-intro) to understand\nthe basic concepts.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=bigquery__reservations-get-started)\n\n*** ** * ** ***\n\nBefore you begin\n\n1. In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n You can create a separate Google Cloud project to administer the reservation and give it a descriptive name like `bq-`\u003cvar translate=\"no\"\u003eCOMPANY_NAME\u003c/var\u003e`-admin`.\n2.\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n3.\n\n\n Enable the BigQuery Reservation API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=bigqueryreservation.googleapis.com)\n\n For more information, see [Enable the BigQuery Reservation API](/bigquery/docs/reservations-commitments#enabling-reservations-api).\n4. In the Google Cloud console, view your slot quotas:\n\n [View your slot quotas](https://console.cloud.google.com/iam-admin/quotas?service=bigqueryreservation.googleapis.com&metric=bigqueryreservation.googleapis.com/total_slots)\n\n To purchase slots, you must have enough slot quota for the region in which\n you want to purchase slots.\n\n If your slot quota for the region is less than the number of slots\n you want to purchase, see [Request a quota increase](/bigquery/quotas#requesting_a_quota_increase).\n\nCreate an autoscaling reservation\n\nCreate a reservation named `prod` in the `US` multi-region, and allocate a maximum of\n100 autoscaling slots to it.\n\n1. In the Google Cloud console, go to the **BigQuery** page.\n\n [Go to BigQuery](https://console.cloud.google.com/bigquery)\n2. In the navigation menu, click **Capacity management**.\n\n3. Click **Create reservation**.\n\n4. In the **Reservation name** field, enter `prod`.\n\n5. In the **Location** drop-down list, select **us (multiple regions in United States)**.\n\n6. In the **Edition** list, select **Standard** . For more information, see\n [Understand BigQuery editions](/bigquery/docs/editions-intro).\n\n7. For **Max reservation size selector** , select **Small (100 Slots)**.\n\n8. Leave the other default setting as they are, and click **Save**.\n\nTo learn how to create a reservation using SQL or the bq tool,\nsee [Create a reservation with dedicated slots](/bigquery/docs/reservations-tasks#create_a_reservation_with_dedicated_slots).\n\nAssign a project to a reservation\n\nAssign a project to the `prod` reservation. Any query jobs that run from this\nproject will use the pool of slots from the `prod` reservation. (In this\ntutorial, you don't run a job.)\n\nYou can assign any project that's in the same organization and region as the\nadministration project where you created the reservation.\n\n1. In the Google Cloud console, go to the **BigQuery** page.\n\n [Go to BigQuery](https://console.cloud.google.com/bigquery)\n2. In the navigation menu, click **Capacity management**.\n\n3. Click the **Slot reservations** tab.\n\n4. In the **Actions** column for the reservation named **`prod`** , click\n more_vert\n **Actions**.\n\n5. Click **Create assignment**.\n\n6. In the **Select an organization, folder or project** section, click **Browse**.\n\n7. Browse or search for the project, and then select it.\n\n8. Click **Create**.\n\nWhen you create a reservation assignment, wait at least 5 minutes before running\na query. Otherwise the query might be billed using on-demand pricing.\n\nTo learn how to assign a project to a reservation using SQL or the bq tool,\nsee [Assign a project or folder to a reservation](/bigquery/docs/reservations-assignments#assign_my_prod_project_to_prod_reservation).\n\nClean up\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\nDelete the project\n\n\nThe easiest way to eliminate billing is to delete the project that you\ncreated for the tutorial.\n\nTo delete the project:\n\n| **Caution** : Deleting a project has the following effects:\n|\n| - **Everything in the project is deleted.** If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.\n| - **Custom project IDs are lost.** When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an `appspot.com` URL, delete selected resources inside the project instead of deleting the whole project.\n|\n|\n| If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects\n| can help you avoid exceeding project quota limits.\n1. In the Google Cloud console, go to the **Manage resources** page.\n\n [Go to Manage resources](https://console.cloud.google.com/iam-admin/projects)\n2. In the project list, select the project that you want to delete, and then click **Delete**.\n3. In the dialog, type the project ID, and then click **Shut down** to delete the project.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nDelete the reservation\n\nWhen you delete a reservation, any jobs that are currently executing with slots\nfrom that reservation will fail. To prevent errors, allow in-flight jobs to\ncomplete before deleting the reservation.\n\n1. In the Google Cloud console, go to the **BigQuery** page.\n\n [Go to BigQuery](https://console.cloud.google.com/bigquery)\n2. In the navigation menu, click **Capacity management**.\n\n3. Click the **Slot reservations** tab.\n\n4. For the reservation named **`prod`** , click **Toggle node**.\n\n5. For each assignment in that reservation, click **Actions** , and then click\n **Delete**.\n\n6. In the **Actions** column for the reservation named **`prod`** , click\n more_vert **Actions**.\n\n7. Click **Delete**.\n\nTo learn how to delete a reservation using SQL or the bq tool, see\n[Delete a reservation](/bigquery/docs/reservations-tasks#delete_a_reservation).\n\nWhat's next\n\n- To learn how to use BigQuery Reservations to manage your workloads, see [Workload management using Reservations](/bigquery/docs/reservations-workload-management)."]]