Skip to content

Instantly share code, notes, and snippets.

@dincosman
Last active June 3, 2024 11:32
Show Gist options
  • Select an option

  • Save dincosman/23b2ac2822097ac700cd27472ae332c5 to your computer and use it in GitHub Desktop.

Select an option

Save dincosman/23b2ac2822097ac700cd27472ae332c5 to your computer and use it in GitHub Desktop.
Query experiencing performance fluctuations
select plan_hash_value
inst_id,
SUM (executions) as total_exec_count,
SUM (elapsed_time) as total_elapsed,
SUM (elapsed_time) / SUM (executions) as elapsed_perexec
FROM gv$sql
WHERE sql_id = '36av371yyctxf'
GROUP BY plan_hash_value, inst_id;
PLAN_HASH_VALUE INST_ID total_exec_count total_elapsed ELAPSED_PEREXEC
2495358432 1 65 768785522 11827469.5692308
1751229217 1 112444 41895314 372.588257265839
1751229217 2 36477 11051569 302.973627217151
2495358432 2 65 767930057 11814308.5692308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment