Wednesday, May 11, 2022
Tables used for sqlid and its stats
SELECT a.object_owner,
a.object_name,
a.object_type,
b.stale_stats
FROM v$sql_plan a
JOIN dba_tab_statistics b
ON a.object_owner = b.owner AND a.object_name = b.TABLE_NAME
WHERE b.object_type = 'TABLE'
AND a.sql_id = TRIM ('&1')
AND (stale_stats IS NULL OR stale_stats = 'YES')
UNION ALL
SELECT a.object_owner,
a.object_name,
a.object_type,
b.stale_stats
FROM v$sql_plan a
JOIN dba_tab_statistics b
ON a.object_owner = b.owner AND a.object_name = b.PARTITION_NAME
WHERE b.object_type = 'PARTITION'
AND a.sql_id = TRIM ('&1')
AND (stale_stats IS NULL OR stale_stats = 'YES')
UNION ALL
SELECT a.object_owner,
a.object_name,
b.object_type,
b.stale_stats
FROM v$sql_plan a
JOIN dba_ind_statistics b
ON a.object_owner = b.owner AND a.object_name = b.index_name
WHERE b.object_type!='SUBPARTITION' and a.sql_id = TRIM ('&1')
AND (stale_stats IS NULL OR stale_stats = 'YES');
Subscribe to:
Post Comments (Atom)
user level export and import
expdp parfile=PLCT170.par oracle@uslp123sd7dfcvxsza > more PLCT050.par userid= "/ as sysdba" dumpfile=T050.dmp logfile=expdpT0...
-
1) For new table creations - after creating the table in custom schema execute below script to generate editoning view and synonym for it in...
-
1) To hold the specific concurrent program Hold update fnd_concurrent_requests set HOLD_FLAG='Y' where PHASE_CODE='P'...
-
Example: SQL Tuning Task Options (Doc ID 2461848.1) Good Plan Hash Value Not Showing in One of the RAC Node for Sqlid Even After Forcing Pl...
No comments:
Post a Comment