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

GetImplementingThingsWithData() performance issue for Large data set

SOLVED
TanmeyTWX
Moonstone

GetImplementingThingsWithData() performance issue for Large data set

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"
                      };

1 ACCEPTED SOLUTION

Accepted Solutions

Re: GetImplementingThingsWithData() performance issue for Large data set

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-...

 

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

View solution in original post

3 REPLIES 3

Re: GetImplementingThingsWithData() performance issue for Large data set

Did you test this as well ?

QueryImplementingThingsWithNamedData * service that returns only the requested properties of all the implementing Things. This service is similar to QueryImplementingThingsWithData, but takes two additional parameters:
  • basicPropertyNames: Basic property name are the generic fields for all properties: name, description, tags, isSystemObject, homeMashup, avatar, projectName
  • propertyNames: any custom properties
The returned JSON consists of the implementing Things with only the desired properties as opposed to all properties
 
Thanks,
Mukul Narang

Re: GetImplementingThingsWithData() performance issue for Large data set

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-...

 

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

View solution in original post

Re: GetImplementingThingsWithData() performance issue for Large data set

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

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.