Timings shown in Dev Console

Hi Team,

We had query on time returned (right hand corner in dev tools console)while querying the index value via GET rest API commands.
If I had index having 1M records and while trying to fetch all records so time showing in the right hand corner is the time for entire 1M records or is it only for few records which we can see in the right hand side panel.

Could you please someone help me to understand the details.

Thanks,
Debasis
Dev_console

Hi @Debasis_Mallick,

The time shown there is the time elapsed for the last query or API call run in the console, so it's for the response in the right hand panel:

Screenshot 2024-01-22 at 11.03.07

If you're looking to get the response time for a query with particular record volumes, or to understand the performance, I would recommend querying with that particular volume or profiling the query of interest via the Search Profiler.

Hope that helps!

What is the request you are doing?

Keep in mind that it will return only 10k documents, not 1M.

thanks @leandrojmp for response so the timings shown in the right hand corner is only for 10K records. Please correct me if I am wrong.

Thanks,
Debasis

The timing is for the request, if you didn't limit the size then it will return a maximum of 10k hits.

It is not possible to know exactly how many hits were returned because you didn't share neither the query nor the response.

1 Like

@leandrojmp Thanks for confirmation. To confirm the theory I uploaded index with count of 15k records. But while querying the Index with below rest API command got o/p as below. The hits are showing 10k with 166ms but while checking the right hand side panel in dev console there is no 10k (the command o/p is suppressed) records showing, only few records showing. Why it is like that can you help me to understand.

GET /employee/_search

{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 10000,
      "relation": "gte"
    },

Thanks,
Debasis

@leandrojmp Did you get chance to look into the above query.

Thanks,
Debasis

Hello, sorry, not sure what I can help here.

But just to correct myself, the maximum hits you can return without pagination is 10k, this doesn't mean that in dev tools it will return 10k hits per default.

Per default if you do not specify a size in your query it will return only 10.

As you can see in the documentation.

size
(Optional, integer) Defines the number of hits to return. Defaults to 10.

So I would say that this time show in Kibana is for a maxium of 10 hits, if you want to know how much time it would take for 10k hits for example you need to use the size parameter.

GET index/_search?size=10000

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