# Degrading search performance and old recods

**URL:** <https://discuss.elastic.co/t/degrading-search-performance-and-old-recods/320892>\
**Category:** Elasticsearch\
**Created:** [December 9, 2022, 2:33pm UTC](https://discuss.elastic.co/t/degrading-search-performance-and-old-recods/320892 "2022-12-09T14:33:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvallel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rvallel/32/114463_2.png) [@rvallel](https://discuss.elastic.co/u/rvallel)\
**Post date:** [December 9, 2022, 2:33pm UTC](https://discuss.elastic.co/t/degrading-search-performance-and-old-recods/320892/1 "2022-12-09T14:33:58Z")

</div>

Hi!

My searches become slower and slower as the number of indexed documents grow.

However, we only query the documents that happen to be produced in the last 3 months.

I wonder if it is possible to have an alias or another Elasticsearch construct that allows for querying only the last 3 months of data so that the performance does not degrade as records grow.

We don't want to discard old records because we may run reports from time to time over the whole index, but those are not performance-critical.

Any ideas on how to stop search performance from degrading?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 9, 2022, 2:45pm UTC](https://discuss.elastic.co/t/degrading-search-performance-and-old-recods/320892/2 "2022-12-09T14:45:33Z")

</div>

Which version of Elasticsearch are you using?

What is the specification of the cluster in terms of hardware, node count and data volumes?

---

<div class="post-metadata">

**Author:** ![rvallel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rvallel/32/114463_2.png) [@rvallel](https://discuss.elastic.co/u/rvallel)\
**Post date:** [December 10, 2022, 8:38am UTC](https://discuss.elastic.co/t/degrading-search-performance-and-old-recods/320892/3 "2022-12-10T08:38:06Z")

</div>

Version is 7.15.x docker  
It is a single node single index... a simple application.

The use case is to provide search support to an app.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 10, 2022, 9:02am UTC](https://discuss.elastic.co/t/degrading-search-performance-and-old-recods/320892/4 "2022-12-10T09:02:41Z")

</div>

What type of storage are you using?

What does `iostat -x` show while you are searching and seeing slowness?

How much data do you have in the cluster?

How much resources does the node have in terms of CPU, RAM and heap?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 7, 2023, 9:02am UTC](https://discuss.elastic.co/t/degrading-search-performance-and-old-recods/320892/5 "2023-01-07T09:02:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
