cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

GetStreamEntriesWithData vs QueryStreamEntriesWithData

SOLVED
Regular Member

GetStreamEntriesWithData vs QueryStreamEntriesWithData

I have been working with streams for a while and I've found that GetStreamEntriesWithData and QueryStreamEntriesWithData return essentially the same thing. With QueryStreamEntriesWithData, you do have a few more options as to what kind of data you get back (like a time range, or a custom query), but I've found it runs much slower than GetStreamEntriesWithData. Is this actually true? With GetStreamEntriesWithData, you do only get the option to select how many rows you return, but you can set a filter after the "query" (which I still find to be faster than QueryStreamEntriesWithData) Is there a specific use case for each service?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: GetStreamEntriesWithData vs QueryStreamEntriesWithData

Within QueryStreamEntriesWithData what should work faster would be the Time Filter. 

The End and Start Date filters are applied and executed within the database (persistence provider) that holds the schema before the data is send to Thingworx.

Regular content query of information as defined by the datashape will work exactly the same.

All data is retrieved and filter/query is applied within Thingworx vs. in the database.

 

There should be some more detailed articles in this regard that deal with how to optimize and best use QueryStreamEntries and QueryDataTablesEntries vs. FindDataTableEntries

There are development efforts under way to improve these.

1 REPLY 1

Re: GetStreamEntriesWithData vs QueryStreamEntriesWithData

Within QueryStreamEntriesWithData what should work faster would be the Time Filter. 

The End and Start Date filters are applied and executed within the database (persistence provider) that holds the schema before the data is send to Thingworx.

Regular content query of information as defined by the datashape will work exactly the same.

All data is retrieved and filter/query is applied within Thingworx vs. in the database.

 

There should be some more detailed articles in this regard that deal with how to optimize and best use QueryStreamEntries and QueryDataTablesEntries vs. FindDataTableEntries

There are development efforts under way to improve these.