# Is there a way to simulate slow queries in Elasticsearch?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-simulate-slow-queries-in-elasticsearch/51381>\
**Category:** Elasticsearch\
**Created:** [May 31, 2016, 6:34am UTC](https://discuss.elastic.co/t/is-there-a-way-to-simulate-slow-queries-in-elasticsearch/51381 "2016-05-31T06:34:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aalexgabi](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@aalexgabi](https://discuss.elastic.co/u/aalexgabi)\
**Post date:** [May 31, 2016, 6:34am UTC](https://discuss.elastic.co/t/is-there-a-way-to-simulate-slow-queries-in-elasticsearch/51381/1 "2016-05-31T06:34:56Z")

</div>

Hello,

Is there a way to simulate slow queries? I want to test an application and I would like to simulate queries that would take up space in queue and will mark a thread as active for couple of minutes to see how the application handles failures and full queue.

I would like to avoid adding gigabytes of data because this would take time and space.

Thank you.

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [May 31, 2016, 10:17am UTC](https://discuss.elastic.co/t/is-there-a-way-to-simulate-slow-queries-in-elasticsearch/51381/2 "2016-05-31T10:17:23Z")

</div>

Hi,

to my knowledge there is no such query, but you could probably use a script query that either sleeps somewhere or performs some costly calculation. Haven't tried this myself though, but that might be an option.

---

<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:** [July 5, 2017, 10:47pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-simulate-slow-queries-in-elasticsearch/51381/3 "2017-07-05T22:47:44Z")

</div>


