2026-05-01 07:25:46

This commit is contained in:
2026-05-01 09:25:48 +02:00
parent ea39d398ae
commit b2358a2f1b
60 changed files with 5675 additions and 4109 deletions
+8 -8
View File
@@ -1,5 +1,5 @@
/* Statistics details for table partitions
Usage: @tpstat <owner> <table> <partition>
vplesnila 2024-01-29: creation
@@ -11,9 +11,9 @@ col PARTITION_NAME for a20 head "Partition name"
col last_DML for a20 head "Last DML"
col last_analyzed for a20 head "Last Analyzed"
col STALE_STATS for a7 head "Stale"
col NUM_ROWS head "#Rows"
col PARTITION_POSITION head "P#" for 999
col INSERTS head "Table|INS"
col NUM_ROWS head "#Rows"
col PARTITION_POSITION head "P#" for 999
col INSERTS head "Table|INS"
col UPDATES head "Table|UPD"
col DELETES head "Table|DEL"
col TRUNCATED head "Table|TRUN"
@@ -23,10 +23,10 @@ compute sum of INSERTS on report
compute sum of UPDATES on report
compute sum of DELETES on report
select
select
tabstat.OWNER
,tabstat.TABLE_NAME
,tabstat.PARTITION_POSITION
,tabstat.PARTITION_POSITION
,tabstat.PARTITION_NAME
,tabstat.NUM_ROWS
,tabstat.STALE_STATS
@@ -36,13 +36,13 @@ select
,tabmod.DELETES
,tabmod.TRUNCATED
,tabmod.TIMESTAMP last_DML
from
from
dba_tab_statistics tabstat
,dba_tab_modifications tabmod
WHERE
tabstat.owner = '&&1'
AND tabstat.table_name = '&&2'
AND (tabstat.partition_name like '%&&3%' or tabstat.partition_name is NULL)
AND (tabstat.partition_name like '%&&3%' or tabstat.partition_name is NULL)
AND tabstat.owner = tabmod.table_owner(+)
AND tabstat.table_name = tabmod.table_name(+)
AND tabstat.partition_name = tabmod.partition_name(+)