Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I sort?

I have a database, which I query, and I'm unsure of where to perform the sorting of the results, so far I've have the following options.

  • At the MySQL query.
  • At list level(Using a LinkedList)
  • Sorting an unsorted list using comparators before showing the results (basically in the jsp)

The List is composed by ObjectDTO so where would it be more efficient. Any ideas?

like image 701
Tristian Avatar asked Dec 13 '10 20:12

Tristian


People also ask

Where is the sort option?

Method A: Sort button in Home tab In the Editing group under Home tab, you will easily get the Sort & Filter button. Click the drop down button besides Sort & Filter button, and then you will get more sorting options: Sort A to Z, Sort Z to A, and Custom Sort.

Where can I sort data?

Select any cell in the data range. On the Data tab, in the Sort & Filter group, click Sort. In the Sort dialog box, under Column, in the Sort by box, select the first column that you want to sort. Under Sort On, select the type of sort.

Where is sort and Filter?

To focus on a specific set of your data, you can filter a range of cells or a table. Click any cell in the range or table. On the HOME tab, click Sort & Filter, and click Filter.


1 Answers

Database. Using indexes and other information about the data, db's are very good at this.

like image 73
n8wrl Avatar answered Oct 20 '22 00:10

n8wrl