dataiotech Labs
dbaguide.com · Senior DBA & SRE Diagnostic Standard v2.0
Home/Error Library/ORACLE/oracle-perf-ora-cat-15-cardinality-misestimation-e-rows-vs-a-rows-di
Oracle
Oracle 19c, 26aiSEVERITY: P1 HIGH
6 min read
Cardinality Misestimation (E-Rows vs A-Rows Divergence) [Optimizer Condition]

Optimizer Condition · Cardinality Misestimation (E-Rows vs A-Rows Divergence)

An optimizer condition in which the CBO's predicted row count (E-Rows * Starts) diverges by one or more orders of magnitude from actual runtime rows (A-Rows) at a plan step. Cardinality misestimation is the foundational optimizer driver behind poor join orders, wrong Nested Loops vs. Hash Join selections, and undersized PGA workareas.

Reviewed by:Senior Oracle DBA (dataiotech Labs)

Diagnostic Disambiguation Matrix

When It Occurs

Verified operational error scenario under Oracle 19c, 26ai: An optimizer condition in which the CBO's predicted row count (E-Rows * Starts) diverges by one or more orders of magnitude from actual runtime rows (A-Rows) at a plan step. Cardinality misestimation is the foundational optimizer driver behind poor join orders, wrong Nested Loops vs. Hash Join selections, and undersized PGA workareas.

When This Is NOT The Error

Not an error belonging to an external database engine or unrelated subsystem; native to this catalog.

First 60 Seconds Emergency Protocol (Read-Only Safety Rule):

The error string is a symptom, not the root cause. Do not restart database servers blindly! Execute the read-only diagnostic queries below to determine the actual failure mode before attempting session terminations or configuration changes.

NOTE
Entry Type (ORA-CAT-15): Optimizer Condition Licensing Requirement: Core Oracle Database (EE & SE2) — no extra pack required for DBMS_XPLAN.DISPLAY_CURSOR or extended statistics. SQL Tuning Advisor / SQL Profiles require Tuning Pack + Diagnostics Pack. · Required Privileges: SELECT on V$SQL, V$SQL_PLAN, V$SQL_PLAN_STATISTICS_ALL, V$SESSION; EXECUTE on DBMS_XPLAN

▸1. Description & Context

An optimizer condition in which the CBO's predicted row count (E-Rows * Starts) diverges by one or more orders of magnitude from actual runtime rows (A-Rows) at a plan step. Cardinality misestimation is the foundational optimizer driver behind poor join orders, wrong Nested Loops vs. Hash Join selections, and undersized PGA workareas.

Severity Context: High — Early cardinality errors compound up the join tree, directly causing suboptimal join algorithms and severe plan regressions.

▸2. Possible Causes (Confirm Root Cause via Evidence)

  • •Possible cause (must be verified): Optimizer independence assumption across correlated filter columns lacking extended column-group statistics.
  • •Possible cause: Functions, complex expressions, or opaque PL/SQL predicates applied to columns.
  • •Possible cause: Stale table statistics or missing/inaccurate histograms on skewed columns.
  • •Possible cause: Out-of-range predicate values exceeding recorded column LOW_VALUE/HIGH_VALUE bounds.

▸3. Read-Only Diagnostic Steps

  1. 1Execute the query in a controlled session with /*+ GATHER_PLAN_STATISTICS */ (or session STATISTICS_LEVEL=ALL).
  2. 2Run DBMS_XPLAN.DISPLAY_CURSOR(sql_id, child_no, 'ALLSTATS LAST +PREDICATE +OUTLINE') and compare Starts * E-Rows against A-Rows.
  3. 3Trace the earliest diverging row source to its Predicate Information and inspect DBA_TAB_COL_STATISTICS and DBA_STAT_EXTENSIONS.
sql
-- ORA-CAT-15 | Core Oracle Database (EE & SE2) — no extra pack required for DBMS_XPLAN.DISPLAY_CURSOR or extended statistics. SQL Tuning Advisor / SQL Profiles require Tuning Pack + Diagnostics Pack. | Syntax-Reviewed (Not Runtime-Tested) -- READ-ONLY | License-free core PL/SQL & V$ view -- Replace sql_id and child_number from V$SQL after capturing runtime stats SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('&target_sql_id', NULL, 'ALLSTATS LAST +PEEKED_BINDS +PREDICATE'));

▸4. Controlled Remediation Options

  • •Create column-group or expression extended statistics via DBMS_STATS.CREATE_EXTENDED_STATS and regather table stats.
  • •Refresh statistics promptly on monotonically increasing date/ID columns to avoid out-of-range selectivity decay.
  • •Protect production with a verified SQL Plan Baseline until statistics or SQL predicates are corrected (or evaluate a SQL Profile if Tuning Pack is licensed).

▸5. Related Terms & References

NEW CONCEPTENGINEERING MASTERY
Senior Interview Ready

ORACLE Diagnostic Standards, Operational Reliability, and Interview Readiness.

This error is not merely a config typo; it is a lesson in consistency models, concurrency architectures, and capacity planning.

Measurable Learning Objectives:
  • Articulate error symptoms, distinguishing diagnostics, and safe recovery steps.
  • Implement architectural safeguards to permanently eliminate root causes.

What Senior Interviews Ask About This Error?

Q1When this error (Cardinality Misestimation (E-Rows vs A-Rows Divergence) [Optimizer Condition]) surfaces in production, what must be inspected within the first 60 seconds?
Mid
Senior Engineer & Architect Response:

Before restarting servers blindly, inspect active sessions, locks, and recent engine logs to identify the true failure mode.

Q2Which metrics should be integrated into alerting to prevent recurrence of this issue?
Senior
Senior Engineer & Architect Response:

Set up early warning metrics targeting connection pools, memory grants, disk headroom, or lock queues with actionable thresholds.

Q3How should applications defensively guard against this database failure?
Junior
Senior Engineer & Architect Response:

Implement idempotent retry loops with backoff, strict query timeouts, verified connection pool bounds, and structured error logging.

Senior DBA & SRE Career Roadmap

Explore database reliability milestones, incident response protocols, and architectural leadership.

View Roadmap

More ORACLE Diagnostic Playbooks

Battle-tested triage guides for production incidents.

View All
dbaguide.com · Optimizer Condition: Cardinality Misestimation (E-Rows vs A-Rows Divergence) · Kanıt Odaklı Teşhis Standardı
Last Updated: November 2, 2026 · Format v2.0