Skip to main content

Synopsis

CARDINALITY (object_name, number) A hint to specify the expected record set size in a specific operation. OBJECT_NAME can be:
  1. A specific table. Contains the expected number of rows in the table. For example:
Here the hint indicates that there are 100 rows in the org table (for the purpose of query optimization). It doesn’t say anything about how many of them have division = ’EASTERN’.
  1. An alias given to a sub-query result. Contains the expected results from it as if it was done without push down/up. The sub-query must be aliased, and the alias name passed as the argument of the hint.
For example:
Specifying multiple hints with the same object_name and different numbers is contradictory and is not allowed.