# Wondering about sanity checking queries before execution

**URL:** <https://discuss.elastic.co/t/wondering-about-sanity-checking-queries-before-execution/41964>\
**Category:** Elasticsearch\
**Created:** [February 17, 2016, 4:00am UTC](https://discuss.elastic.co/t/wondering-about-sanity-checking-queries-before-execution/41964 "2016-02-17T04:00:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![h2k](https://avatars.discourse-cdn.com/v4/letter/h/e5b9ba/32.png) [@h2k](https://discuss.elastic.co/u/h2k)\
**Post date:** [February 17, 2016, 4:00am UTC](https://discuss.elastic.co/t/wondering-about-sanity-checking-queries-before-execution/41964/1 "2016-02-17T04:00:50Z")

</div>

We are building a front end for end users to analyze large amounts of data, which will result in some custom queries on the backend. I want to build in a sanity check so users don't end up needlessly querying extremely large datasets and taking down other, not-necessarily-ES parts of our system. Is there a way to preview before something is returned how large a result will be (kind of like a dry run of the query that does not return results, or only return if it meets some sanity threshold), or is "through" the only way out?

-H

---

<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, 11:15pm UTC](https://discuss.elastic.co/t/wondering-about-sanity-checking-queries-before-execution/41964/2 "2017-07-05T23:15:51Z")

</div>

Closed on July 5, 2017, 11:15pm UTC


