MATLAB: How long does sortrows take to execute and are there any faster alternatives

array sortrows execution-time

I am running a long simulation that produces a large table of almost 18 million rows and 70 columns.
That part of the simulation has completed; the last part consists in sorting the table in ascending order with regard to the content of the 66th column of the table. For this I use the code :
order = sortrows(Table, 66) ;
where Table is a 18million x 70 array. Generating Table took approximately 12 hours. I expected sorting it wouln't take long, but the program has been running for nearly 13 hours now to sort the table.
Is this normal ? How much longer should I expect to wait ? Am I doing something wrong ? Should I stop the simulation and try it again ? Are there any faster alternatives to sortrows, and if yes how should I implement them ?
Thanks for any help!
PS: I am using a Mac (oct. 2011) with an Intel i5 1.7GHz dual core processor, 4GB RAM and flash SSD storage.

Best Answer

For the case of sorting w.r.t only 1 column, the following approach is faster than SORTROWS on my machine
[~,idx]=sort(Table(:,66));
order=Table(idx,:);
However, I don't really understand what you're doing to fit this data in memory. It doesn't seem like you're using RAM alone, and that could be part of what's slowing things down. The data is 10 GB if you're using type double, and that's just for the table itself, not its sorted copy. If you're using uint16, the total data (pre-sorted plus sorted) will still run over 4 GB. Are you using uint8, then?