This post is more than 5 years old
16 Posts
0
142634
request optimization
Hello guys,
I made some request but the execution time is too long, could you help me to optimize it please ?
Regards,
This post is more than 5 years old
16 Posts
0
142634
Hello guys,
I made some request but the execution time is too long, could you help me to optimize it please ?
Regards,
Top
john_s_main
132 Posts
0
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.
DELL-Thomas B
171 Posts
0
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.