-
Notifications
You must be signed in to change notification settings - Fork 18
[DOC-12664] Automatic Workload Reporting #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/8.0
Are you sure you want to change the base?
Conversation
These metrics are captured at set intervals and stored as snapshots. | ||
Each snapshot can be considered as a point-in-time capture of the query performance and includes key metrics such as total elapsed time (minimum, maximum, and average), CPU usage, and number of queries executed. | ||
|
||
All snapshots are stored in a user-defined keyspace (bucket, scope, collection), which acts as a central repository for AWR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All snapshots are stored in a user-defined keyspace (bucket, scope, collection)...
the keyspace cannot be a scope. it can only be the path to a bucket or collection
|
||
* **Troubleshooting Real-Time Issues**: | ||
You can quickly identify slow running queries or instances of high resource usage. | ||
By using the SQL IDs from the AWR data, you can trace the problematic queries and their sources and resolve issues faster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add how sqlId will be present in completed_requests entries as well.. And that is how a user can trace queries?
UPDATE system:awr SET enabled = true; | ||
---- | ||
|
||
Upon executing this query, AWR will begin collecting performance statistics for all queries executed on the cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon executing this query, AWR will begin collecting performance statistics for all queries executed on the cluster.
This needs to be slightly modified..
Only when enabled
is set to true and the location
is set and the configured keyspace available.. will AWR begin its operations.
|
||
|**enabled** + | ||
| Indicates whether AWR is enabled or disabled. | ||
| Boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please add the default value for enabled
?
Default: false
By default AWR is disabled, so it is an opt-in feature.
My apologies, I believe this was not added in the DOC ticket description.
| Boolean | ||
|
||
| **location** + | ||
| The target keyspace (bucket, scope, collection) where the data is stored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The target keyspace (bucket, scope, collection) where the data is stored.
This needs to be slightly modified, since the keyspace cannot be a scope. "location" can only be the path to a bucket or collection.
Add an example as well.
Example: "bucket1.scope1.collection1"
| **pln** + | ||
|An array containing the encoded, compressed outlines of the execution plan for both the minimum and maximum execution times of the statement. | ||
|
||
You can use the xref:n1ql:n1ql-language-reference/stringfun.adoc#fn-str-uncompress[UNCOMPRESS()] function to decompress this the value into a string, which can then be passed to xref:n1ql:n1ql-language-reference/jsonfun.adoc[DECODE_JSON()] for formatting, if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor:
This reads like you must use UNCOMPRESS() and then DECODE_JSON() on the entire array of plan outlines.
Perhaps change "... UNCOMPRESS() function to decompress this the value into a string..." to "...UNCOMPRESS() function to decompress the execution plan strings..." ?
|
||
=== Example | ||
==== | ||
The following example fetches AWR data for a specific SQL ID, including the statement text, max execution plan, statement count, total time, and max CPU usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change:
"statement count" to "number of executions"
Using AWR, you can easily identify these differences, understand your workload, and determine areas for optimization. | ||
|
||
When enabled, AWR automatically gathers detailed metrics from the Query service for every query that you run. | ||
These metrics are captured at set intervals and stored as snapshots. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps when introducing the "snapshot" concept.. we can elaborate a bit more. The reason being, it should be clear what the snapshot holds, and it is generated for every unique statement.
The details:
AWR generates a snapshot for every unique statement that executed in the interval. And the snapshot is the aggregate information for all executions of that statement during the reporting interval.
|**interval** + | ||
|The duration of the reporting interval. | ||
That is, the time between each snapshot or data collection. | ||
If the interval is set to 10 minutes, AWR captures a data every 10 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor:
Maybe change "a data" to "snapshots"
@@ -0,0 +1,420 @@ | |||
= Automatic Workload Reporting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add snapshot document retention management to this page?
That users will need to configure the TTL for the AWR location to configure the retention period of the snapshot documents.
Add documentation for Automatic Workload Reporting (AWR).
Jira: DOC-12664
Doc changes:
system:awr
.Previews:
Credentials: Preview docs for internal review