Skip to content

Commit 73792f7

Browse files
authored
Merge pull request #189079 from Venkat1340/Users/Venkat1340/Performancetips
MsDocs: Performance and Metadata requests (V2 SDK)
2 parents 9b8f155 + 5b5748f commit 73792f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

articles/cosmos-db/sql/performance-tips.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: StefArroyo
66
ms.service: cosmos-db
77
ms.subservice: cosmosdb-sql
88
ms.topic: how-to
9-
ms.date: 01/24/2022
9+
ms.date: 02/18/2022
1010
ms.devlang: csharp
1111
ms.custom: devx-track-dotnet, contperf-fy21q2
1212

@@ -64,6 +64,10 @@ If you're testing at high throughput levels (more than 50,000 RU/s), the client
6464
> [!NOTE]
6565
> High CPU usage can cause increased latency and request timeout exceptions.
6666
67+
## <a id="metadata-operations"></a> Metadata operations
68+
69+
Do not verify a Database and/or Collection exists by calling `Create...IfNotExistsAsync` and/or `Read...Async` in the hot path and/or before doing an item operation. The validation should only be done on application startup when it is necessary, if you expect them to be deleted (otherwise it's not needed). These metadata operations will generate extra end-to-end latency, have no SLA, and their own separate [limitations](https://aka.ms/CosmosDB/sql/errors/metadata-429) that do not scale like data operations.
70+
6771
## <a id="logging-and-tracing"></a> Logging and tracing
6872

6973
Some environments have the [.NET DefaultTraceListener](/dotnet/api/system.diagnostics.defaulttracelistener) enabled. The DefaultTraceListener poses performance issues on production environments causing high CPU and I/O bottlenecks. Check and make sure that the DefaultTraceListener is disabled for your application by removing it from the [TraceListeners](/dotnet/framework/debug-trace-profile/how-to-create-and-initialize-trace-listeners) on production environments.

0 commit comments

Comments
 (0)