Reference documentation and code samples for the Google Cloud Database Center V1beta Client class QueryStats.
QueryStats contains the stats for a particular combination of query_hash, query_string and resource_type.
Generated from protobuf message google.cloud.databasecenter.v1beta.QueryStats
Namespace
Google \ Cloud \ DatabaseCenter \ V1betaMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ query_hash |
string
The query hash of the query. |
↳ normalized_query |
string
The query string is normalized query without any PII data. |
↳ resource_type |
string
The type of the resource. sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance |
↳ resource_ids |
array<ResourceId>
The resource ids for which the query stats are collected. |
↳ query_metrics |
QueryMetrics
Metrics related to the query performance. |
↳ inefficient_query_info |
InefficientQueryInfo
Information about inefficient query. |
getQueryHash
The query hash of the query.
| Returns | |
|---|---|
| Type | Description |
string |
|
setQueryHash
The query hash of the query.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getNormalizedQuery
The query string is normalized query without any PII data.
| Returns | |
|---|---|
| Type | Description |
string |
|
setNormalizedQuery
The query string is normalized query without any PII data.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResourceType
The type of the resource.
sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance
| Returns | |
|---|---|
| Type | Description |
string |
|
setResourceType
The type of the resource.
sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResourceIds
The resource ids for which the query stats are collected.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<ResourceId> |
|
setResourceIds
The resource ids for which the query stats are collected.
| Parameter | |
|---|---|
| Name | Description |
var |
array<ResourceId>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getQueryMetrics
Metrics related to the query performance.
| Returns | |
|---|---|
| Type | Description |
QueryMetrics|null |
|
hasQueryMetrics
clearQueryMetrics
setQueryMetrics
Metrics related to the query performance.
| Parameter | |
|---|---|
| Name | Description |
var |
QueryMetrics
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInefficientQueryInfo
Information about inefficient query.
| Returns | |
|---|---|
| Type | Description |
InefficientQueryInfo|null |
|
hasInefficientQueryInfo
clearInefficientQueryInfo
setInefficientQueryInfo
Information about inefficient query.
| Parameter | |
|---|---|
| Name | Description |
var |
InefficientQueryInfo
|
| Returns | |
|---|---|
| Type | Description |
$this |
|