# Fetching data from elastic search using java code but performance is slow

**URL:** <https://discuss.elastic.co/t/fetching-data-from-elastic-search-using-java-code-but-performance-is-slow/101120>\
**Category:** Elasticsearch\
**Created:** [September 20, 2017, 7:22am UTC](https://discuss.elastic.co/t/fetching-data-from-elastic-search-using-java-code-but-performance-is-slow/101120 "2017-09-20T07:22:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 20, 2017, 12:32pm UTC](https://discuss.elastic.co/t/fetching-data-from-elastic-search-using-java-code-but-performance-is-slow/101120/2 "2017-09-20T12:32:16Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

I'm editing your code...

How do you know it's "slow"?

Can you add a trace before and after this line and print current time:

```auto
Response response = restClient.performRequest("GET", "/hist_latest_5.5.0/_search",Collections.<String, String>emptyMap(),
			entity);

```

---

_[View the full topic](https://discuss.elastic.co/t/fetching-data-from-elastic-search-using-java-code-but-performance-is-slow/101120)._
