After deploying our application we found some Hangfire collections with lot of 429's errors. Our DB team has suggested the following changes:
1. Below query would benefit from adding the following composite index on both collections: ["\/type ASC","\/key ASC","\/score ASC"]
{"query":"SELECT TOP 1000.2 VALUE r1['p2']\nFROM r1\nWHERE ((r1.p1 = @param1) AND (r1.p3 BETWEEN @param2 AND @param3))\nORDER BY r1.p3","parameters":[{"name":"@param1","value":"str1"},{"name":"@param2","value":0},{"name":"@param3","value":1700100000}]}
2. We have observed that status 429 error code on below query
*{"query":"SELECT FROM doc WHERE IS_DEFINED(doc.expire_on) AND doc.expire_on < 1694454340","parameters":[]}**
As recommended by Microsoft can this be rewritten more optimally as below:
{"query":"SELECT * FROM doc WHERE doc.expire_on < 1694454340","parameters":[]}
In the following picture you can see the improvements after applying the changes:
Additional changes
Also, I removed "noStrictGenericChecks": true from tsconfig.json because the pipeline was failing but I am not sure about the implications. Let me know if you have any concerns.
After deploying our application we found some Hangfire collections with lot of 429's errors. Our DB team has suggested the following changes:
1. Below query would benefit from adding the following composite index on both collections: ["\/type ASC","\/key ASC","\/score ASC"]
2. We have observed that status 429 error code on below query
As recommended by Microsoft can this be rewritten more optimally as below:
In the following picture you can see the improvements after applying the changes:
Additional changes Also, I removed "noStrictGenericChecks": true from tsconfig.json because the pipeline was failing but I am not sure about the implications. Let me know if you have any concerns.