LogoLogo
  • Platform
    • Manage Your Account
    • Technical Support
  • Services
    • Shared Indexing
      • Hosted Subgraphs
        • Quick Start Guide
          • Purchase Subscription
        • Manage Hosted Subgraphs
          • Webhook
          • Settings
      • Hosted SubQuery
        • Quick Start Guide
          • Purchase Subscription
        • Manage Hosted SubQuery
          • Settings
    • Dedicated Indexing
      • Graph Nodes
        • Quick Start Guide
          • Purchase Subscription
        • Graph Node Manual
          • Deploy Graph Node
          • View Analytics
          • Manage Addon Services
          • Ledger Data Pruning
        • Subgraph Manual
          • Manage Subgraph
          • Webhook Management
          • Index Data Pruning
          • Settings
          • Substreams-Powered Subgraphs
      • Subquery Nodes
        • Quick Start Guide
          • Purchase Subscription
        • Subquery Node Manual
          • Deploy Subquery Node
          • View Analytics
          • Manage Addon Services
        • Subquery Manual
          • Manage Subquery
          • Settings
Powered by GitBook
On this page
  • Manage Index Data Pruning On Subgraph
  • Configure Pruning
  • Deconfigure Pruning
Export as PDF
  1. Services
  2. Dedicated Indexing
  3. Graph Nodes
  4. Subgraph Manual

Index Data Pruning

PreviousWebhook ManagementNextSettings

Last updated 20 days ago

Subgraphs, by default, store a full version history for entities, allowing consumers to query the subgraph as of any historical block. Index Data Pruning is an operation that deletes entity versions from a subgraph older than a certain block, so it is no longer possible to query the subgraph as of prior blocks. In GraphQL, those are only queries with a constraint block { number: <n> } } or a similar constraint by block hash where n is before the block to which the subgraph is pruned. Queries that are run at a block height greater than that are not affected by pruning, and there is no difference between running these queries against an unpruned and a pruned subgraph.

History Blocks setting which is used to periodically check whether the subgraph has accumulated more history than that. Whenever the subgraph does contain more history than that, the subgraph is automatically repruned. Repruning is performed whenever the subgraph has more than History Blocks * 1.8 blocks of history.

Manage Index Data Pruning On Subgraph

Step 1: Purchase Index Data Pruning addons by navigating to .

Refer page for more details.

Step 2: To enable the Storage & Query Optimizer addon service, navigate to the specific node where it needs to be enabled.

Refer page for more details.

Step 3: Select a subgraph to navigate to its details page, then click on the Index Data Pruning tab. This section display Index Data Pruning configuration for the respective subgraph.

Configure Pruning

Before configuring index pruning, ensure the subgraph is deployed.

To configure index data pruning for a subgraph, follow these steps:

  1. Click the Configure Pruning button, a modal window will appear.

  2. Set desired History Blocks. ( The minimum value must be set at 500, while the maximum value should align with the current block of the subgraph. )

  3. To prune once, select the Prune Once checkbox (Repruning will not occur); otherwise, leave it unselected.

  4. Click the Confirm button to configure index data pruning, or click Close button to dismiss the modal without making changes.

This will initiate the process to configure index data pruning on the subgraph.

Once the index data pruning is configured you will be notified via in-app notification and see this on the dashboard.

Deconfigure Pruning

To deconfigure index data pruning for a subgraph, follow these steps:

  1. Click the Deconfigure button, a modal window will appear.

  2. Click the Yes button to deconfigure index data pruning, or click No button to dismiss the modal.

Graph Nodes Purchase
Purchase Subscription
Manage Addon Services