-
Notifications
You must be signed in to change notification settings - Fork 478
[Oracle] Resolve divisor error in performance datastream #7718
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
Conversation
🌐 Coverage report
|
@@ -7,7 +7,7 @@ hosts: | |||
raw_data.enabled: true | |||
driver: "oracle" | |||
sql_queries: | |||
- query: SELECT name, physical_reads, db_block_gets, consistent_gets, 1 - (physical_reads / (db_block_gets + consistent_gets)) "Hit_Ratio" FROM V$BUFFER_POOL_STATISTICS | |||
- query: SELECT name, physical_reads, db_block_gets, consistent_gets, 1 - (physical_reads / (db_block_gets + consistent_gets)) "Hit_Ratio" FROM V$BUFFER_POOL_STATISTICS where (db_block_gets + consistent_gets) > 0 | |||
response_format: table |
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.
Having this check as a prevention mechanism is fine.
But, in a properly configured Oracle Instance, can there be a use case where this (db_block_gets + consistent_gets) is 0?
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 same question was asked in the SDH and it is observed in a production instance of Oracle, surprisingly.
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.
Values as below are observed
select name, physical_reads from V$BUFFER_POOL_STATISTICS;
DEFAULT 413583949349
KEEP 0
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.
Ok, then this check should be fine
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.
Looks good!
@@ -7,7 +7,7 @@ hosts: | |||
raw_data.enabled: true | |||
driver: "oracle" | |||
sql_queries: | |||
- query: SELECT name, physical_reads, db_block_gets, consistent_gets, 1 - (physical_reads / (db_block_gets + consistent_gets)) "Hit_Ratio" FROM V$BUFFER_POOL_STATISTICS | |||
- query: SELECT name, physical_reads, db_block_gets, consistent_gets, 1 - (physical_reads / (db_block_gets + consistent_gets)) "Hit_Ratio" FROM V$BUFFER_POOL_STATISTICS where (db_block_gets + consistent_gets) > 0 | |||
response_format: table |
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.
Ok, then this check should be fine
Package oracle - 1.20.1 containing this change is available at https://epr.elastic.co/search?package=oracle |
What does this PR do?
The query
SELECT name, physical_reads, db_block_gets, consistent_gets, 1 - (physical_reads / (db_block_gets + consistent_gets)) "Hit_Ratio" FROM V$BUFFER_POOL_STATISTICS
may result in error when(db_block_gets + consistent_gets)
is zero.Checklist
changelog.yml
file.How to test this PR locally
Related issues
Screenshots
After the change
PR Review Priority - High
The PR is related to an SDH