bugfoot
bugfoot

Reputation: 667

Query large CQEngine ResultSet multiple times

I have the following use case of a real-time app using CQEngine:

  1. Query a large (10M+ element) collection for a given criteria (let's say criteria A), which would match a substantial amount of the collection, approx. 5K-100K
  2. Do multiple (10+) queries on the ResultSet of (1), let's call them criteria B[i]
  3. Rinse and repeat

What is the best practice (to achieve lowest latency) in this case? Iterate over ResultSet of (1), create the same indices over ResultSet of (1) as for the original collection and perform the queries that way, or query A AND B[i] over the original collection each time?

Upvotes: 1

Views: 239

Answers (0)

Related Questions