Oracle Tables with Locked Statistics

Displays tables that have locked optimizer statistics, including owner, table name, and lock type. Useful for identifying objects where statistics updates are prevented and may affect query optimization.

oraclesqlindexing-statisticsv1.0.0
0 stars0 downloads2 views0 comments
By OracleDba • Created

Code

(15 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/tables_with_locked_stats.sql
-- Author       : Tim Hall
-- Description  : Displays tables with locked stats.
-- Requirements : Access to the DBA views.
-- Call Syntax  : @tables_with_locked_stats.sql
-- Last Modified: 06-DEC-2013
-- -----------------------------------------------------------------------------------

SELECT owner,
       table_name,
       stattype_locked
FROM   dba_tab_statistics
WHERE  stattype_locked IS NOT NULL
ORDER BY owner, table_name;

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!