Is your feature request related to a problem? Please describe
Currently, sort by (_time desc) limit N is very slow when the volume of logs retrieved before the sort pipe is large. The best solution is, of course, to reduce the volume by applying more specific filters to narrow the results or by using more fine-grained fields in the stream to split the data into smaller, more manageable groups.
However, there’s a potential opportunity to optimize this path in the same way as the limit in the HTTP query argument.
Describe the solution you'd like
Automatically detecting the sort by (_time desc) limit N pattern and handling it through the same optimized path as the HTTP limit query argument could improve performance.
Describe alternatives you've considered
No response
Additional information
No response
Is your feature request related to a problem? Please describe
Currently,
sort by (_time desc) limit Nis very slow when the volume of logs retrieved before the sort pipe is large. The best solution is, of course, to reduce the volume by applying more specific filters to narrow the results or by using more fine-grained fields in the stream to split the data into smaller, more manageable groups.However, there’s a potential opportunity to optimize this path in the same way as the
limitin the HTTP query argument.Describe the solution you'd like
Automatically detecting the
sort by (_time desc) limit Npattern and handling it through the same optimized path as the HTTPlimitquery argument could improve performance.Describe alternatives you've considered
No response
Additional information
No response