Splunk Search

Different results for error "specified span would result in too many (>50000) rows" based on time range

keet1009
New Member

I am trying to run the below to get the avg/max number of hits per second each day. I have tried this multiple times and sometimes it works without issues (esp. for "Previous Month") and sometimes I get the the specified span would result in too many (>50000) rows (esp. for Today or Previous Week)

host = host  sourcetype=sourcetype | fields linecount  _time -_* |fields linecount  _time -_* | timechart span=1s count | timechart span=1d max(count) avg(count)

Any thoughts on why I would sometimes get this error when running the same query for the same time period?

Thanks!

Tags (1)
0 Karma

somesoni2
Revered Legend

Give this a try

| tstats count WHERE host = host sourcetype=sourcetype by _time span=1s | timechart span=1d max(count) avg(count)

Since you're using only the default metadata fields, the tstats will give you same results with lightening fast speed.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...