Comparison of Query Methods

The following table presents a comparison of performance query methods.
Method
Notes
QueryPerf
  • Specify an array of
    PerfQuerySpec
    objects.
  • An unset
    PerfQuerySpec.metricId
    property produces results for all counters defined for
    PerfQuerySpec.entity
    .
  • PerfQuerySpec.maxSample
    is ignored for historical statistics.
You can use this method to retrieve historical statistics; you can also use it as a raw data feed. For information about retrieving the raw data collected on ESXi servers, see Using the QueryPerf Method as a Raw Data Feed.
QueryPerfComposite
  • Method works only at the host level. You can use a single call to the
    QueryPerfComposite
    method to retrieve performance data for a host and its virtual machines.
  • Specify a single
    PerfQuerySpec
    object.
  • You must specify a list of performance metrics to identify the data to be retrieved (
    PerfQuerySpec.metricId
    ).
  • You cannot specify
    PerfQuerySpec.maxSample
    .
This method is designed for efficient client-server communications.
QueryPerfComposite
usually generates less network traffic than
QueryPerf
because it returns a large-grained object, a
PerfCompositeMetric
data object, that contains all the data.