Table Storage
Service 23

Table Storage

NoSQLKey-value

Azure Table Storage is a cheap, schemaless key-value and wide-column store for large volumes of structured, non-relational data. It lives inside a storage account, costs a fraction of a cent per gigabyte, and serves simple lookups by key at scale without any of a database's management.

It is deliberately minimal: no secondary indexes, no joins, no complex queries, no global distribution. When an application needs those, the upgrade path is the Cosmos DB Table API, which speaks the same protocol with far more capability — at a far higher price. Table Storage is the right answer precisely when the access pattern is simple and the budget matters.

Data Model

Each entity has a partition key and a row key, and together they form the primary key. The partition key groups entities for scalability and transactions; the row key uniquely identifies an entity within a partition. Beyond those, properties are schemaless — different entities in the same table can carry different fields. Designing for this two-part key is the whole art of Table Storage.

Performance and Partitioning

Lookups by partition key and row key are fast and scale well; queries that scan across partitions or filter on non-key properties are slow and grow worse with data volume. A well-chosen partition key spreads load and keeps related entities together; a poor one creates hot partitions or forces table scans. As with Cosmos, the key design decides whether it is fast or unusable.

When to Use It

Table Storage fits telemetry, logs, device data, and user or session records with a known, key-based access pattern and a tight budget. It does not fit anything needing rich queries, secondary indexes, transactions across partitions, or low-latency global reads — those are Cosmos DB's job, and reaching for Table Storage there leads to slow scans and workarounds.

Limits

Table Storage has no secondary indexes, no server-side joins, and limited transaction scope (entity-group transactions within a single partition only). It inherits its storage account's redundancy — including geo-redundant GRS and GZRS for cross-region durability — but that is async DR replication, not active global distribution. The Cosmos DB Table API offers the same API surface with automatic indexing, true multi-region distribution with local reads and writes, and guaranteed throughput — the path when an application outgrows these limits.

Table Storage vs Cosmos DB Table API

Table Storage — Cheap, schemaless key-value in a storage account, with simple key lookups and no indexing. Choose it for high-volume, simple-access, cost-sensitive data.

Cosmos DB Table API — The same API with automatic secondary indexing, global distribution, and provisioned throughput. Choose it when the app needs rich queries, low latency, or global reach.

Common Mistakes
  • Querying on non-key properties or across partitions at scale — these force table scans that get slower as the data grows.
  • Choosing a partition key that concentrates load or forces scans, the same hot-partition trap as Cosmos DB.
  • Expecting secondary indexes, joins, or cross-partition transactions — Table Storage has none of them.
  • Using Table Storage for a workload that needs rich queries or global low-latency reads, instead of the Cosmos DB Table API.
  • Assuming Cosmos-style global distribution — Table Storage can be geo-redundant (GRS/GZRS) for durability, but it has no active multi-region reads and writes; that is the Cosmos DB Table API.
  • Modeling relational data with foreign keys and joins in a store that supports neither.
Best Practices
  • Design the partition key and row key around the application's known access pattern before storing anything.
  • Use Table Storage for high-volume, simple, key-based access where cost matters most.
  • Keep queries to partition-key and row-key lookups; avoid cross-partition or non-key filters at scale.
  • Move to the Cosmos DB Table API when the app needs secondary indexes, rich queries, or global distribution — the protocol is the same.
  • Use entity-group transactions only within a single partition, where they are supported.
  • Match the storage account's redundancy to the data's value, as with any storage-account service.
Comparable servicesAWS DynamoDBGCP Bigtable / Datastore

Knowledge Check

What forms the primary key of a Table Storage entity?

  • The partition key and row key together as a composite key
  • A single auto-incrementing numeric ID column assigned by the service on insert
  • Any entity property explicitly marked as indexed
  • The storage account name plus the table name

When should you move from Table Storage to the Cosmos DB Table API?

  • When the app needs secondary indexes, rich queries, low latency, or global distribution — the API is the same
  • When you want the cheapest possible per-gigabyte storage cost and have no need for richer queries or secondary indexes
  • When the data comfortably fits in a single partition
  • When you only ever look up by partition and row key

Why do queries on non-key properties perform poorly in Table Storage?

  • There are no secondary indexes, so such queries scan the table and slow down as data grows
  • Non-key property queries are billed at a premium per-transaction rate that climbs with each matched entity
  • Table Storage rejects them outright with a query error
  • They require enabling global distribution on the account first

You got correct