Start a new topic

Query time extremely long

Hello,


I have a collection with around 50,000 registers. When I execute a query, either via an Endpoint or REST API that it is supposed to return around 30,000 registers. It tooks around 15-30 seconds. Is this normal or is there anything I can do to speed things up?


The query to the collection is something like this: {"status":"occupied","company":"ABC Co.", "timeend": { $gte: "2017-01-01T00:00:00.000Z", $lte: "2017-11-01T00:00:00.000Z" }}


Thank you.


Carlos,


Just to confirm, you are not getting any error. You are just seeing a delay. Right?


  1. What is the name of that collection?
  2. You mentioned that the collection has 50,000 rows. How many columns are present in the collection?
  3. Is there any column which contains huge data?
  4. Can you try executing a simple basic query from API console and let me know if you still see any delay? Please check Query Basics Documentation.
  5. Do you any other collection which has similar or more number of records? Can you please check if you see delay while executing queries on that collection?
  6. Does using different browser make any difference in performance?



Thanks,

Pranav




Pranav,


Yes, it is just a delay in response time, no error.


1. The name of the collection is "History".

2. The collection has 14 columns.

3. The timestamp is the largest data in any column. ("2017-11-01T00:00:00.000Z" for example).

4. I tried with a simple query (?query={"status":"occupied"}) and it stills takes about 10 seconds to respond.

5. No, this is my largest collection, the other ones that I have are not larger than 100 rows.

6. I have tried Chrome, Firefox, nodejs from Windows console and Postman. All with the same results.


Thanks, 

Carlos.

Carlos,

Thanks for answering all the questions. I have escalated this to engineering and will get back to you once I hear back from them.

 

Thanks,

Pranav

BACK-3003

Carlos,

  1. When were the slowdowns observed? Can you please provide exact date and time?
  2. Are there any collection hooks that could be adding to the latency?
  3. Just to confirm, can you try using different network if possible and see if it makes any difference.

Thanks,
Pranav

 

Pranav,


1. The slowdowns are observed at any time that I try to get the query.

2. No, they are not any collection hooks.

3. We have tried in different networks and it takes the same amount of time, about 10 seconds is the fastest response time that we get.


Thanks,

Carlos.

Carlos,

We reviewed our logs and not seeing any issues on our side. The slowest call to History collection on 10/26 took only 4.6 seconds. All the database lookups that we have looked at are much quicker than 15-30 seconds. Please check following details:

Request id - 5f724ae6bc4545b2810a551f1502db58.
Latency - 17054/0/0/3757/23230 (Tq/Tw/Tc/Tr/Tt)

Note the unusually high Tq (time to receive the query) and Tt (Total request time, from the incoming request until caller finished reading the response), both signs of a poor network connection on the caller's side. Other calls also exhibit this symptom, not just queries on History.

Can you please retry your scenario and provide specific date/ time/ request id that took too long?

Thanks,
Pranav

 

Login or Signup to post a comment