Add simple sorting for tables with <= 5000 results