I have 30 GB table size and i am trying to use dense_rank function to order the data and get the latest 12 month data for each primary key.
But as thisĀ dense_rank is applied to whole table . It was very time consuming one, is there any alternate way .