Advanced Features

Learn how to fine-tune the network and physical partitions for advanced and demanding scenarios.

Introduction

In this lesson, we’ll quickly see some advanced topics that can help us improve security and cost when dealing with Cosmos DB in production scenarios.

Materialized views

Sometimes, we might need to query the same data differently, which usually means a different partition key. If we frequently query without a partition key, we have poor performance and high cost. The only solution might be duplicating the data in a different container with a new partition key and keeping the copy in sync.

Instead of doing this manually, we can now use the Materialized Views feature, currently in preview. We can specify the source container and query and the target container and partition key.

This way, we don’t need to think about the sync at all, and we can monitor the process from the portal!

Access this course and 1400+ top-rated courses and projects.