Saturday, January 31, 2026

Oracle Performance Views You Must Know

 V$SESSION | V$SQLAREA | V$SQL | V$SYSTEM_EVENT & More


Oracle performance tuning starts with visibility.

And visibility comes from dynamic performance views (V$ views).

If you know how to read these views, you can diagnose 80% of production issues quickly 👇

⭐ Why V$ Views Matter

V$ views show what is happening right now inside the database:

✔ Active sessions

✔ Running SQL

✔ CPU & wait events

✔ Memory usage

✔ Contention & blockers

👉 They are the foundation of performance analysis.

⭐ 1️⃣ V$SESSION — Who Is Doing What

The most-used performance view.

Use it to find:

✔ Active vs inactive sessions

✔ Waiting sessions & wait events

✔ Blocking sessions

✔ Current SQL per session

Key columns

• SID, SERIAL#

• STATUS

• EVENT, WAIT_CLASS

• BLOCKING_SESSION

• SQL_ID

👉 First place to check when users say “database is slow”.

⭐ 2️⃣ V$SQLAREA — Top SQL by Resource Usage

Shows aggregated statistics per SQL.

Use it to identify:

✔ Top CPU SQL

✔ High elapsed time SQL

✔ Frequently executed SQL

Key columns

• SQL_ID

• EXECUTIONS

• ELAPSED_TIME

• CPU_TIME

• BUFFER_GETS

• DISK_READS

👉 Find the real heavy hitters.

⭐ 3️⃣ V$SQL — Child Cursor Details

Shows SQL per execution plan / child cursor.

Use it to diagnose:

✔ Bind peeking issues

✔ Multiple child cursors

✔ Plan instability

Key columns

• SQL_ID

• CHILD_NUMBER

• PLAN_HASH_VALUE

• EXECUTIONS

👉 Essential for plan issues.

⭐ 4️⃣ V$SYSTEM_EVENT — Where the DB Is Waiting

Shows system-wide wait events.

Use it to identify:

✔ I/O bottlenecks

✔ Lock contention

✔ Network waits

✔ CPU vs wait issues

Key columns

• EVENT

• TOTAL_WAITS

• TIME_WAITED

👉 Answers “why is the database slow overall?”

⭐ 5️⃣ V$SESSION_WAIT / V$SESSION_EVENT

Shows current and cumulative waits per session.

Use for:

✔ Session-level delays

✔ Intermittent waits

👉 Complements V$SESSION.

⭐ 6️⃣ V$ACTIVE_SESSION_HISTORY (ASH)

Samples what sessions were doing over time.

Use it to:

✔ Analyze short-lived issues

✔ Identify top SQL & waits

✔ Correlate workload spikes

👉 Time-based performance truth.

⭐ 7️⃣ V$LOCK — Lock Analysis

Use it to identify:

✔ Who is blocking

✔ Lock type

✔ Contention severity

👉 Critical for blocking & deadlocks.

🧠 Typical Troubleshooting Flow

1️⃣ Check V$SESSION

2️⃣ Identify SQL using SQL_ID

3️⃣ Analyze in V$SQLAREA / V$SQL

4️⃣ Check waits in V$SYSTEM_EVENT

5️⃣ Validate with ASH / SQL Monitoring

👉 Structured approach = faster resolution.

🎯 Final Takeaway

Oracle performance tuning is impossible without V$ views.

✔ V$SESSION → session activity

✔ V$SQLAREA → heavy SQL

✔ V$SQL → plan instability

✔ V$SYSTEM_EVENT → bottlenecks

✔ ASH → historical truth

Master these views, and you’ll diagnose issues confidently in Oracle production systems.

Oracle Database Upgrade: 12c → 19c using DBUA (Real DBA Checklist)

 Oracle Database upgrade from 12c to 19c using DBUA (Database Upgrade Assistant).

Sharing a practical DBA checklist that can help Oracle professionals during upgrade activities 👇
✅ PRE-UPGRADE TASKS (Critical Phase)
🔹 1. Download Oracle 19c software from Oracle Support
🔹 2. Ensure full database backup is available (RMAN recommended)
📁 Backup & move required files:
tnsnames.ora
listener.ora
sqlnet.ora
pfile / spfile
password file (orapwd)
🔹 3. Install & unzip Oracle 19c software in a new ORACLE_HOME
🔹 4. Run Pre-Upgrade Tool (preupgrade.jar)
🔹 5. Review preupgrade log and generated scripts:
preupgrade_fixups.sql
postupgrade_fixups.sql
🔹 6. Check minimum tablespace size requirements
🔹 7. Gather dictionary statistics

EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
🔹 8. Purge recycle bin

PURGE DBA_RECYCLEBIN;
🔹 9. Run preupgrade_fixups.sql to fix issues
🔹 10. Verify archive log destination size
🔹 11. Create Guaranteed Restore Point

CREATE RESTORE POINT pre_upgrade GUARANTEE FLASHBACK DATABASE;
🔄 UPGRADE PHASE (Using DBUA)
🔹 12. Start DBUA from Oracle 19c home:

$ORACLE_HOME/bin/dbua
🔹 13. Follow GUI steps:
Select database
Choose base location
Start upgrade process
🔹 14. Monitor upgrade progress & logs
✅ POST-UPGRADE TASKS (Validation Phase)
🔹 15. Run postupgrade_fixups.sql
🔹 16. Recompile & verify invalid objects

@?/rdbms/admin/utlrp.sql
🔹 17. Drop restore point

DROP RESTORE POINT pre_upgrade;
🔹 18. Update COMPATIBLE parameter

ALTER SYSTEM SET compatible='19.0.0' SCOPE=SPFILE;
🔹 19. Verify database components

SELECT comp_name, status FROM dba_registry;
🔹 20. Update TNS entries in 19c ORACLE_HOME
🔹 21. Configure password file (orapwd)
🔹 22. Take full post-upgrade backup
💡 Key Takeaways
✔ Pre-checks are the most important part of any Oracle upgrade
✔ Always keep rollback & restore strategy ready
✔ Validate database health after upgrade
✔ 19c is the Long-Term Support (LTS) version – highly recommended
🤝 For Oracle DBAs