Rows Hints

Function

These hints specify the number of rows in an intermediate result set. Both absolute values and relative values are supported.

Syntax

1
rows(table_list #|+|-|* const)

Parameter Description

For example:

rows(t1 #5): The result set of t1 is five rows.

rows(t1 t2 t3 *1000): Multiply the result set of joined t1, t2, and t3 by 1000.

Suggestion

Examples

Hint the query plan in Examples as follows:

1
2
explain
select /*+ rows(store_sales store_returns *50) */ i_product_name product_name ...

Multiply the result set of joined store_sales and store_returns by 50. The optimized plan is as follows:

The estimation value after the hint in row 11 is 360, and the original value is rounded off to 7.