Friday, January 6, 2012

Oracle ALL_ROWS vs FIRST_ROWS

When to use First_Rows hint vs All_Rows hint in ORACLE:

First_rows:
Get the very first row back to the client as fast as possible. This is good for an interactive client server environment where the client runs a query and shows the user the first 10 rows or so and waits for them to page down to get more.

All_rows: The query tries to get the very last row as fast as possible. This makes sense in a stored procedure for example where the client does not regain control until the stored procedure completes. You don't care if you have to wait to get the first row if the last row gets back to you twice as fast. In a client server/interactive application you may well care about that.

[Ref: http://asktom.oracle.com]

No comments:

Post a Comment