Running queries in parallel slows down the performance proportionally to the number of queries #10309
-
Hi all, So I am writing some performance tests for our application and I am having the following behavior. Instead of querying them 1 by 1 i would like to query them all in parallel. Since each firestore query depends on the size of the result set they all should take approximately the same time. So running them in parallel should be approximately the same as running a single one(well a small overhead at best). My results are the following: I am on 100/50 Mbps network so it's not a bandwidth problem. (documents are about 100kb each) Does anybody have an idea why does this happen? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem was in my testing I used names for documents which were lexicographically close so there was a read hot spot. After generating random names, the results are as expected (around 600-800ms) for 100 documents(so a small overhead, and a there is a bit more variability in the results). |
Beta Was this translation helpful? Give feedback.
The problem was in my testing I used names for documents which were lexicographically close so there was a read hot spot.
After generating random names, the results are as expected (around 600-800ms) for 100 documents(so a small overhead, and a there is a bit more variability in the results).