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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

GetStreamEntriesWithData vs QueryStreamEntriesWithData

zhudson
7-Bedrock

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
PaiChung
22-Sapphire I
(To:zhudson)

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.

View solution in original post

1 REPLY 1
PaiChung
22-Sapphire I
(To:zhudson)

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.

Top Tags