How to Investigate Hanging SQL Statements
Last updated on JUNE 06, 2017
Applies to:Oracle Database - Enterprise Edition - Version 22.214.171.124 and later
Oracle Database - Personal Edition - Version 126.96.36.199 and later
Oracle Database - Standard Edition - Version 188.8.131.52 and later
Information in this document applies to any platform.
This article addresses cases where a single query appears to hang. This is a problem with a large number of potential solutions since a query appearing to hang may indicate a number of issues including:
- A single query is on CPU but does not finish in a desired timescale so appears to be hung to the user
- A single query is on CPU in a loop/spin and will never finish
- The whole database is actually hung but it has been noticed only in a single query or this query is THE critical query
- A single query is actually in a hung state – quite rare
- Dictionary queries 'hanging'
Most incidents of a single query appearing to hang can be approached in a similar manner to any SQL that has begun performing slowly, with a few adjustments.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms