> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trychroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Distributed/Cloud Performance

> How to think about performance in distributed Chroma deployments.

## Sharding

Distributed Chroma shards data across collections. Individual collections have
isolated cold starts and rate limits, which prevents the workload of one
collection from interfering with the workload of another.

If you have data that can be sharded, you are strongly encouraged to do so. It
will usually cost less and perform better. For example, if an AI platform is
using Chroma to store customers' isolated knowledge bases, it should put each
customer's data in its own collection.

## Indexes

By default, Chroma builds indexes for all data, including full-text and regex
search on the document, as well as inverted indexes on all metadata values.
These indexes add overhead when writing to Chroma.

If you are not using FTS or regex, or if you are not filtering by a metadata
value, you can disable these indexes using the
[Schema](/cloud/schema/index-reference).

## Batch Deletes

Chroma lets you delete an unbounded number of documents satisfying a `Where` filter.

<CodeGroup>
  ```python Python theme={null}
  collection.delete(
  	where={"chapter": "20"}
  )
  ```

  ```typescript TypeScript theme={null}
  await collection.delete({
      where: {"chapter": "20"} //where
  })
  ```

  ```rust Rust theme={null}
  use chroma::types::{MetadataComparison, MetadataExpression, MetadataValue, PrimitiveOperator, Where};

  let where_clause = Where::Metadata(MetadataExpression {
      key: "chapter".to_string(),
      comparison: MetadataComparison::Primitive(
          PrimitiveOperator::Equal,
          MetadataValue::Str("20".to_string()),
      ),
  });

  collection.delete(
      None,               // ids: Option<Vec<String>>
      Some(where_clause), // r#where: Option<Where>
  ).await?;
  ```
</CodeGroup>

This can be a costly operation if the collection size is large. Add a limit clause to delete the documents
in batches in order to not affect the latency of other operations.

<CodeGroup>
  ```python Python theme={null}
  collection.delete(
  	where={"chapter": "20"},
    limit=10000,
  )
  ```

  ```typescript TypeScript theme={null}
  await collection.delete({
      where: {"chapter": "20"},
      limit: 10000,
  })
  ```

  ```rust Rust theme={null}
  use chroma::types::{MetadataComparison, MetadataExpression, MetadataValue, PrimitiveOperator, Where};

  let where_clause = Where::Metadata(MetadataExpression {
      key: "chapter".to_string(),
      comparison: MetadataComparison::Primitive(
          PrimitiveOperator::Equal,
          MetadataValue::Str("20".to_string()),
      ),
  });

  collection.delete(
      None,               // ids: Option<Vec<String>>
      Some(where_clause), // r#where: Option<Where>
      Some(10000),        // limit: Option<u32>
  ).await?;
  ```
</CodeGroup>
