# Performance of "exists" query

**URL:** <https://discuss.elastic.co/t/performance-of-exists-query/59591>\
**Category:** Elasticsearch\
**Created:** [September 1, 2016, 6:44pm UTC](https://discuss.elastic.co/t/performance-of-exists-query/59591 "2016-09-01T18:44:43Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cweiske](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cweiske/32/11732_2.png) [@cweiske](https://discuss.elastic.co/u/cweiske)\
**Post date:** [September 2, 2016, 6:41am UTC](https://discuss.elastic.co/t/performance-of-exists-query/59591/3 "2016-09-02T06:41:38Z")

</div>

> [@nik9000](#):
>
> If you added the documents routing on the URL then you could add the same routing on the query and only hit a single shard. That is fairly similar in concept to using the URL as the document's ID but doesn't have problems with very very long urls.

I tried the routing, but that does not make a difference. I'm also testing on a fairly tiny ES database with 200 documents.

I did not try multisearch yet, but have the feeling that maybe the HTTP request handling (albeit to 127.0.0.1) add most of the query time.  
Using keep-alive might solve the problems here.

---

_[View the full topic](https://discuss.elastic.co/t/performance-of-exists-query/59591)._
