My Oracle Support Banner

How the Oracle CBO Chooses a Path for the SELECT COUNT(*) Command (Doc ID 124717.1)

Last updated on MAY 15, 2024

Applies to:

Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Database - Enterprise Edition - Version to [Release 7.0 to 8.0.3]
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Information in this document applies to any platform.


The purpose of this article is to explain how the Oracle Cost Based
Optimizer (CBO) evaluates the best path to do a SELECT COUNT(*) or a
SELECT COLUMN(column) without using a WHERE clause.

NOTE: In the images and/or the document content below, the user information and data used represents fictitious
data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product.
Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.



This article is meant for all DBAs and anyone involved in SQL Tuning.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.