Unanswered: How to maintain the order - performance issue
I'm having a table PHONE(ID,PHONE_RANK) where an individual ID can have more than 1 record .
I've to select the record having the highest PHONE_RANK where the hierarchy (from highest to lowest) is 1,2,3,4,5,6,7,8,12,9,10,11 (i.e. select record where PHONE_RANK = 1 over record where PHONE_RANK = 2).
The hierarchy order is important , 12 has come before 9 .
The table contains 80 million data. It's a sample table,it's not the original table.