Knowledge Management

How to create an index on a kvstore?

rsimmons
Splunk Employee
Splunk Employee

Is there a way to create an index on a kvstore so that indexed based queries will run quickly?

Tags (2)
1 Solution

rsimmons
Splunk Employee
Splunk Employee

We have a stanza called accelerate fields that can be added to collections.conf. Accelerations are similar to database indexes on fields in that they help quickly locate data without having to search every event in a collection each time a search is run. You can create accelerations for one or more fields in a collection. However, accelerations slightly decrease insert performance and they impact disk space.

To accelerate a field, define the acceleration using the following setting in the collection's stanza:

[kvstorecoll]
accelerated_fields.my_accel = {"id": 1}

The example shows the definition of a "my_accel" acceleration for the "id" field sorted in ascending order in collections.conf.

View solution in original post

rsimmons
Splunk Employee
Splunk Employee

We have a stanza called accelerate fields that can be added to collections.conf. Accelerations are similar to database indexes on fields in that they help quickly locate data without having to search every event in a collection each time a search is run. You can create accelerations for one or more fields in a collection. However, accelerations slightly decrease insert performance and they impact disk space.

To accelerate a field, define the acceleration using the following setting in the collection's stanza:

[kvstorecoll]
accelerated_fields.my_accel = {"id": 1}

The example shows the definition of a "my_accel" acceleration for the "id" field sorted in ascending order in collections.conf.

Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...