Prioritizing a list/table row

I have a table structure where each row is an item,now my use case involves prioritizing it based on certain parameters such that item with highest priority would come at the top. I will have a large number of such items (around 10-20k) hence looking out for UX suggestions for this screen the ease the process. Some of the things that I thought were:

  • drag and drop each item
  • have up and down arrows against each item

Let me know your suggestions.