Splunk Search

Reusing subsearch within a search

fmayot
New Member

I'm using a subsearch multiple times within a search. Is Splunk able to optimize this and run the subsearch only once or do I need to do something else?

Tags (2)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Splunk doesn't optimize that on its own, two executions of the same search at almost the same time may yield different results.

As for doing something else, that may depend on your specific issue - do post your search, maybe there's a way.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You could accelerate your subsearch with report acceleration if eligible, or build it upon an accelerated data model. That would still be multiple executions, but they'd be faster and not require manual summary indexing.

Whether that's the best approach, or if there are entirely different ways of solving your requirements is a different matter, for that you'd have to post more info.

0 Karma

fmayot
New Member

Would there be a way to temporarily cache the results of a subsearch? I've heard about summary indexes but that seems fairly involving for what I'm trying to achieve (essentially ad-hoc queries, often generated by scripts). I can't post a query (I've tried to edit my answer but gave up 30 attemps with the captcha)

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...