title: Why does Max() create an order by in the explain plan?
body: <p>When I attempt to do something like</p>
  
  <pre><code>SELECT Max(ObjectId) FROM Objects;
  </code></pre>
  
  <p>I see that in the explain-plan that this is performed by doing a sort. Now, sorting (which I guess would require something in the complexity of <code>O(nlogn)</code>) must be much costlier than just scanning each row and remembering the max value (which could be done in <code>O(n)</code>). </p>
  
  <p>Am I missing something here? Is oracle really performing a sort or does the explain-plan just use the description "sort" for describing a simple scan of all values in the ObjectId column? If oracle really does perform a "real sort", is there a good reason for doing this that I am missing?</p>
  
  <p>Thanks in advance!</p>