Is there a way to optimizer a SQL count(*) operation?
Without a where clause, a count(*) will
always perform a full-table scan, and the only way to
improve the performance of the count(*) is to use Oracle
For count(*) operations that have a
where clause, an index may be used to alleviate the
full-table scan and a index fast full scan would be an
optimal execution plan.
In these cases where a full-table scan
occurs, you want to search the SQL for predicates that are
not indexed (especially function-based indexes).