---
title: "Indexes: Index Throttling"
description: "Index Throttling* delays indexing operations by a time interval of your choice."
url: "https://docs.ravendb.net/6.2/indexes/index-throttling"
version: "6.2"
---

# Indexes: Index Throttling

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Indexes: Index Throttling

> **Note**
>
> - **Index Throttling** delays indexing operations by a time interval of your choice.  
>   Indexing is triggered normally when items are added or modified, but RavenDB suspends
>   index procession by the set interval.
>
> - The gaps in indexing activity and the procession of
>   [larger batches](#throttling-and-batches)
>   can reduce overall indexing CPU utilization.
>
> - Indexing can be throttled server-wide, per-database, and per-index.
>
> - Index throttling applies to the procession of **existing** indexes.  
>   **New** indexes are processed sequentially without delay.
>
> - In this page:
>   - [Why Use Index Throttling?](#why-use-index-throttling?)
>   - [Index Throttling and Batches](#throttling-and-batches)
>   - [Setting Index Throttling](#setting-index-throttling)
>     - [Server-Wide](#server-wide-index-throttling)
>     - [Per-Database](#index-throttling-per-database)
>     - [Per-Index](#index-throttling-in-an-index-definition)

## Why Use Index Throttling?

Indexing a rapidly modified group of items (e.g. a time series, a group of counters,
or a patched collection) can preoccupy RavenDB with lengthy consecutive indexing of
small batches of items.

![Throttles Index Performance View](https://docs.ravendb.net/assets/images/index-throttling-01-39545f6eaff955c9e66a5f52698175aa.png)

The Indexing Performance view shown above demonstrates the procession of a throttled index
along the timeline, with a 1500 Milliseconds gap between consecutive batches.  
Throttling offers indexing-free time gaps that the database can use for other
tasks and the procession of larger batches when indexing does take place.

> **Info**
>
> Throttled indexes are kept [stale](https://docs.ravendb.net/6.2/indexes/stale-indexes.md#indexes-stale-indexes)
> as long as their procession is incomplete.  
> They are therefore expected to remain stale longer than indexes that are processed sequentially.

## Throttling and Batches

The delay in index procession increases the size of Item [batches](https://docs.ravendb.net/6.2/server/configuration/indexing-configuration.md#indexingmapbatchsize)
that are processed during indexing intervals.

In special cases, throttled indexes' batches are processed without delay.

- The batch following a batch that cannot be processed for known reasons, will be processed
  without delay.
- Accumulated data (collected due to batch size configuration, for example) whose procession
  requires multiple batches, will be processed with no delay between batches.

## Setting Index Throttling

### Server-Wide Index Throttling

Index Throttling can be set server-wide using a designated [configuration option](https://docs.ravendb.net/6.2/server/configuration/configuration-options.md#settingsjson).  
Setting the server-wide configuration option will apply to all databases on a given node.

- Set the index throttling time interval in Milliseconds using the `Indexing.Throttling.TimeIntervalInMs` configuration option, e.g.:  
  `"Indexing.Throttling.TimeIntervalInMs": "5000"`

### Index Throttling Per-Database

Enable or disable index throttling for a specific database using the designated database configuration key.  
Setting this property overrides the
[Server-Wide](#server-wide-index-throttling) default.

- **From Studio**:

  ![Database Configuration Keys](https://docs.ravendb.net/assets/images/index-throttling-02-54757199c7f6013fb091dcd27eda65c0.png)

  1. Open **Settings** > **Database Settings** view.
  2. **Filter Keys** - Enter a search string to locate the configuration key.
  3. **Edit** - Click to edit values (see next image for details).
  4. **Configuration Key** -  
     `Indexing.Throttling.TimeIntervalInMs` - Index Throttling configuration key.
  5. **Effective Value** - The current configuration.
  6. **Origin** - The origin of the current configuration.  
     Can be - Default | Database

  ![Edit Values](https://docs.ravendb.net/assets/images/index-throttling-03-1ba0902c5bd1fbfd994937cc8b23a424.png)

  1. **Override** - Toggle to override the server-wide configuration.
  2. **Edit Value** - Enter a new time in Milliseconds, or leave empty for null (no throttling).
  3. **Set Default** - Click 'Set Default' to select the server-wide default value.
  4. **Save** - Apply changes.
     > **Warning**
     >
     > An edited configuration key's value will become effective only after the database is reloaded.

### Index Throttling in an Index Definition

Setting throttling in an index definition overrides [server-wide](#server-wide-index-throttling)
and [database](#index-throttling-per-database) settings configuration.

- **From Code**:  
  Set throttling for a specific index using the `Indexing.Throttling.TimeIntervalInMs` property.

```csharp
var index = new IndexDefinition
{
  Name = "ByOrderedAt",
  Maps = {"from o in orders select new {o.OrderedAt}"},
  Configuration = new IndexConfiguration
  {
      { "Indexing.Throttling.TimeIntervalInMs", "2000" }
  },
};
```

The batch size can be left for RavenDB to decide, or you can set it yourself using
the [Indexing.MapBatchSize](https://docs.ravendb.net/6.2/server/configuration/indexing-configuration.md#indexingmapbatchsize) property.

```csharp
Configuration = new IndexConfiguration
{
  { "Indexing.Throttling.TimeIntervalInMs", "2000" },
  { "Indexing.MapBatchSize", "50" }
},
```

- **From Studio**:  
  Use the [Configuration tab](https://docs.ravendb.net/6.2/studio/database/indexes/create-map-index.md#configuration) of an index definition
  to set the index's `Indexing.Throttling.TimeIntervalInMs` configuration key value in Milliseconds.  
  ![Configuration Key](https://docs.ravendb.net/assets/images/index-throttling-04-ff344f81c4f021f3bd8a1f577bac0d2e.png)
  1. ****Configuration Tab**** - Open to set index configuration keys.
  2. **Add Customized Indexing Configuration** - Click to add a configuration key.
  3. **Indexing Configuration Key** -  
     Type `Indexing.Throttling.TimeIntervalInMs` or select this key from the droplist to set index throttling.
  4. **Value** - Type the throttling time interval in Milliseconds.
