# Kibana visualization query very slow compared to console

**URL:** <https://discuss.elastic.co/t/kibana-visualization-query-very-slow-compared-to-console/250714>\
**Category:** Kibana\
**Created:** [October 1, 2020, 3:33pm UTC](https://discuss.elastic.co/t/kibana-visualization-query-very-slow-compared-to-console/250714 "2020-10-01T15:33:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [October 1, 2020, 3:33pm UTC](https://discuss.elastic.co/t/kibana-visualization-query-very-slow-compared-to-console/250714/1 "2020-10-01T15:33:14Z")

</div>

Using Kibana 7.9.0, with ES 7.9.0.

Running a visualization with date historgram and terms aggregation, the query takes 1800ms according Kibana inspect panel, but the same ES query takes only 20 ms when running on the console app.

In the browser AJAX debug, I can see multiple HTTP calls to `/s/qwantcom/internal/search/es` , every 100ms, the last give the query response:

```auto
id: "Fkp4cW5sd1AxUVlpbVJBZTkzY2J0WHceUm5FOXJvUWVTYk9wSnMtMm5mNkg3dzo5OTY1MzM5"
is_partial: false
is_running: false
loaded: 2
rawResponse: {took: 1829 .....

```

 ![Capture d’écran 2020-10-01 à 17.37.30](https://us1.discourse-cdn.com/elastic/original/3X/7/7/7711995bd9f79570146f7caf27f9c570803a4e0b.png)

1. Why there are 5 HTTP queries for only 1 ES query?
2. Why this query takes 1829ms whereas the same query (I copy paste the 1st AJAX call request) takes 20ms ?

We found latest Kibana very slow compared to ... version 4, is it possible?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [October 5, 2020, 5:06pm UTC](https://discuss.elastic.co/t/kibana-visualization-query-very-slow-compared-to-console/250714/2 "2020-10-05T17:06:58Z")

</div>

First request to Elasticsearch is the longest, for subsequent requests with the same query, the results are cached in ES. Is the difference of a similar magnitude when refreshing the query after the first load?  
Also, for Kibana 7.9.0 being slower, there are a lot more apps now than in 4.x, plus in 7.10.0 there have been a lot of performance improvements (this is one of the main points of the new version release)

---

<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:** [November 2, 2020, 5:07pm UTC](https://discuss.elastic.co/t/kibana-visualization-query-very-slow-compared-to-console/250714/3 "2020-11-02T17:07:09Z")

</div>

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