Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi Folks,
@PaiChung @CarlesColl @Constantine
I have 500 Things to fetch properties from.And I have already tried fetching the Things first and then query for required properties only. But it still takes lot of time to execute.
Is there any other way to fetch larger set of data from Things in a least possible time.
Note: Already tried below workaround but no luck.
var ThingsList = ThingTemplates["Template"].GetImplementingThings();
var params = {
types: "STRING" ,
t: thingsList ,
columns: "MachineNumber",
expressions: "Things[name].MachineNumber"
};
Solved! Go to Solution.
Hello @TanmeyTWX,
Since 8.4.x the state-of-the-art in fast querying is QueryImplementingThingsWithNamedData, which allows you to limit the number of returned and checked properties. Take a look at this post for a working example: https://community.ptc.com/t5/ThingWorx-Developers/How-to-use-QueryImplementingThingsWithNamedData/m-p/627679
As of today, this is the fastest out-of-the-box way I'm aware of to query things, unless you are prepared to implement some Java extensions, custom caches, etc.
Regards,
Constantine
Did you test this as well ?
Hello @TanmeyTWX,
Since 8.4.x the state-of-the-art in fast querying is QueryImplementingThingsWithNamedData, which allows you to limit the number of returned and checked properties. Take a look at this post for a working example: https://community.ptc.com/t5/ThingWorx-Developers/How-to-use-QueryImplementingThingsWithNamedData/m-p/627679
As of today, this is the fastest out-of-the-box way I'm aware of to query things, unless you are prepared to implement some Java extensions, custom caches, etc.
Regards,
Constantine
Hi @TanmeyTWX.
If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.
Thank you for your participation in our community!
Regards..
--Sharon