กิจกรรม
17 มี.ค. 21 - 21 มี.ค. 10
สร้างแอป AI และตัวแทน เข้าร่วมชุด meetup เพื่อสร้างโซลูชัน AI ที่ปรับขนาดได้ตามกรณีการใช้งานจริงกับนักพัฒนาและผู้เชี่ยวชาญร่วมกัน
ลงทะเบียนตอนนี้เบราว์เซอร์นี้ไม่ได้รับการสนับสนุนอีกต่อไป
อัปเกรดเป็น Microsoft Edge เพื่อใช้ประโยชน์จากคุณลักษณะล่าสุด เช่น การอัปเดตความปลอดภัยและการสนับสนุนด้านเทคนิค
APPLIES TO:
MongoDB
This article explains how to provision throughput in Azure Cosmos DB for MongoDB. You can provision standard(manual) or autoscale throughput on a container, or a database and share it among the containers within the database. You can provision throughput using Azure portal, Azure CLI, or Azure Cosmos DB SDKs.
If you are using a different API, see API for NoSQL, API for Cassandra, API for Gremlin articles to provision the throughput.
Sign in to the Azure portal.
Create a new Azure Cosmos DB account, or select an existing Azure Cosmos DB account.
Open the Data Explorer pane, and select New Collection. Next, provide the following details:
ItemID
).
หมายเหตุ
If you are provisioning throughput on a container in an Azure Cosmos DB account configured with the Azure Cosmos DB for MongoDB, use myShardKey
for the partition key path.
// refer to MongoDB .NET Driver
// https://docs.mongodb.com/drivers/csharp
// Create a new Client
String mongoConnectionString = "mongodb://DB AccountName:Password@DB AccountName.documents.azure.com:10255/?ssl=true&replicaSet=globaldb";
mongoUrl = new MongoUrl(mongoConnectionString);
mongoClientSettings = MongoClientSettings.FromUrl(mongoUrl);
mongoClient = new MongoClient(mongoClientSettings);
// Change the database name
mongoDatabase = mongoClient.GetDatabase("testdb");
// Change the collection name, throughput value then update via MongoDB extension commands
// https://learn.microsoft.com/azure/cosmos-db/mongodb-custom-commands#update-collection
var result = mongoDatabase.RunCommand<BsonDocument>(@"{customAction: ""UpdateCollection"", collection: ""testcollection"", offerThroughput: 400}");
Azure Resource Manager templates can be used to provision autoscale throughput on database or container-level resources for all Azure Cosmos DB APIs. See Azure Resource Manager templates for Azure Cosmos DB for samples.
Azure CLI can be used to provision autoscale throughput on a database or container-level resources for all Azure Cosmos DB APIs. For samples see Azure CLI Samples for Azure Cosmos DB.
Azure PowerShell can be used to provision autoscale throughput on a database or container-level resources for all Azure Cosmos DB APIs. For samples see Azure PowerShell samples for Azure Cosmos DB.
See the following articles to learn about throughput provisioning in Azure Cosmos DB:
กิจกรรม
17 มี.ค. 21 - 21 มี.ค. 10
สร้างแอป AI และตัวแทน เข้าร่วมชุด meetup เพื่อสร้างโซลูชัน AI ที่ปรับขนาดได้ตามกรณีการใช้งานจริงกับนักพัฒนาและผู้เชี่ยวชาญร่วมกัน
ลงทะเบียนตอนนี้การฝึกอบรม
โมดูล
Configure Azure Cosmos DB for NoSQL - Training
Select between the various throughput offerings in Azure Cosmos DB for NoSQL.
ใบรับรอง
ได้รับการรับรองจาก Microsoft: Azure Cosmos DB Developer Specialty - Certifications
เขียนคิวรีที่มีประสิทธิภาพ สร้างนโยบายการจัดทําดัชนี จัดการ และเตรียมใช้งานทรัพยากรใน SQL API และ SDK ด้วย Microsoft Azure Cosmos DB