Is it fair to say that it takes no time (compared to the nested SELECT) to make the second (outer) ‘SELECT’ from a result-set like this?
SELECT some_column FROM ( SELECT some_column FROM some_table ) AS _alias
One Solution collect form web for “Select performance”
The SQL optimizer is likely to treat that SELECT statement as if it was written:
SELECT some_column FROM some_table
So there’ll be no performance difference whatsoever. The optimizer does its best to minimize the cost of producing the answer and will rework the query you write to speed things up. Only the most naïve optimizer would evaluate the inner SELECT and save the results in a table and then run the outer SELECT on that result.