Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

142634

October 1st, 2013 13:00

request optimization

Hello guys,

I made some request but the execution time is too long, could you help me to optimize it please ?

01-10-2013 15-58-55.png

01-10-2013 15-58-45.png

Regards,

132 Posts

October 3rd, 2013 09:00

Try changing your return type to the root object for VMs, VMWVirtualMachine,

and the path on root reference to VMWModel/virtualCenters/virtualMachineCollection/virtualMachines

Your where-clause path would then be to a property on or below the return object. 

There is no purpose to making the return object anything below VMWVirtualMachine, unless you are creating 1 row per object in a 1-Many relationship with the root object, such as processors or logical disks.

In this case, the path in the where clause comparison is triggering additional unnecessary walking back up the tree from the return object, which can work but not very efficiently in large environments.

Note that the aggregations are going to cause performance issues with large data sets, and how they are created can dramatically change performance.  Always test performance first with no filter or aggregation, then add filters, then add aggregations.

Aggregations are generally limited in capabilities in Queries, anyway.  In general, I would remove the aggregation, do the filter here, then feed the output to a WCF function to do the aggregation(s) as needed. 

171 Posts

October 2nd, 2013 01:00

Is the current value all that you are concerned with or the time range?  Batch queries in general are going to give better performance for larger data sets and large time frames.

No Events found!

Top