Stream entries and query speed
I have a stream containing "alarms"
the source field is the name of the equipment who generated the alarm, like MACHINE1 MACHINE2 ....
I need to query entries for all records with two or more source names (not just one)
I Use QueryStreamEntriesWithData, keeping source parameter as undefined and using a query with the "IN" syntax, like {source IN array_of_elements} (where each element is a machine name).
This query works ... but it is slow if I have millions of rows and searching for many months (I also use time range obviously, and limit result to 2000 records).
is the source field indexed ? is this query executed at the database or thingworx layer ?
is there a faster way ?

