Pages

Tuesday, March 31, 2026

queryy

Production-Safe Next Steps ONLY
Do NOT gather stats or invalidate plans directly. Instead:
-- Step 1: Get actual runtime stats (READ ONLY, zero risk)
SELECT sql_id, child_number, elapsed_time/1000000 elapsed_sec,
       buffer_gets, disk_reads, executions,
       buffer_gets/DECODE(executions,0,1,executions) bgets_per_exec
FROM v$sql
WHERE sql_id = 'd8txf935msbx5';
-- Step 2: Check last stats gather on these tables (READ ONLY)
SELECT table_name, last_analyzed, num_rows, stale_stats
FROM dba_tab_statistics
WHERE table_name IN ('MSC_TP_ID_LID','MSC_ST_TRADING_PARTNER_SITES',
                     'MSC_TRADING_PARTNER_SITES')
AND owner = 'MSC';
-- Step 3: Check index column order (READ ONLY)
SELECT column_name, column_position
FROM dba_ind_columns
WHERE index_name = 'MSC_TP_ID_LID_U1'
ORDER BY column_position;

No comments:

Post a Comment