On TopN Analysis: Rownum – Row_Number – Rank

Here is another reason why you might test before making a decision on which function to use by your previous experiences. In this scenerio there is large partitioned log table just having a primary jey on nlog_id column and we want to find the last N inserted rows.

Code Listing 20 : On TopN Analysis: Rownum – Row_Number – Rank

Testing Information : the scripts mentioned are tested on Oracle Database 10g Enterprise Edition Release 10.2.0.2.0

Refences Used : On Top-n and Pagination Queries By Tom Kyte, Oracle Magazine Article

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s