Using the Rally LookBack API is there a limit to the number of elements you can query with using the in operator ?

StackOverflow https://stackoverflow.com/questions/10490379

  •  06-06-2021
  •  | 
  •  

Question

Given the expression

{WorkProduct: {$in:[0001,0002,0003,...]}

Is there a limit to the number of items I can query against ?

Was it helpful?

Solution

Our API forces no limit but the overall query we send to our underlying engine must be smaller than 4MB. Even allowing for overhead, theoretically, you could put a couple hundred thousand entries in an $in clause before hitting that.

So, that's the theory and absolute limit. I suspect you'll hit a practical limit long before then because $in clauses perform on the order of m * Log (n), where n is the number of elements in the collection and m is the number of elements in your $in clause. So, there will be a linear slow down with the number of elements in the $in clause.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top