Splunk Search

[Advice/Help] Lookup Table search taking long

Player01
Engager

Hello All,

Can ya'll give me advice on why my query taking so long? In a dashboard it just times out and regular verbose it takes quite a bit of time. Purpose of the query is to simply just search my index and output me the result that match in the lookup url. 

index=myindex sourcetype=mysource
| stats count by url
| fields - count
| search [|inputlookup LCL_url.csv | fields url]
| sort url

Thank you

Labels (1)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

If the lookup is of any size and if the number of events from the index search is large, yes, this will take vary long because it is effectively performing

| search url = "foo.com" OR url = "bar.com" OR url = "barz" OR ...

Moving the subsearch to index search can save some time because you won't be streaming as many events:

index=myindex sourcetype=mysource
  [|inputlookup LCL_url.csv | fields url]
| stats count by url
| fields - count
| sort url

However, using a lookup file as subsearch may not be the best option to begin with.

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Player01 ,

Are all your searches slow or only this one?

how many logs have you in your index and in your lookup?

which storage have? is it compliant with the Splunk requirement of at least 800 IOPS?

Ciao.

Giuseppe

0 Karma

yuanliu
SplunkTrust
SplunkTrust

If the lookup is of any size and if the number of events from the index search is large, yes, this will take vary long because it is effectively performing

| search url = "foo.com" OR url = "bar.com" OR url = "barz" OR ...

Moving the subsearch to index search can save some time because you won't be streaming as many events:

index=myindex sourcetype=mysource
  [|inputlookup LCL_url.csv | fields url]
| stats count by url
| fields - count
| sort url

However, using a lookup file as subsearch may not be the best option to begin with.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Player01 ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...