-1

I have a SQL query which takes 4 seconds to return results, however when adding an ORDER BY the query then takes approximately 40 seconds to return the results. Why does the ORDER BY have such a dramatic difference in the time?

And if I were to have no ability to change the manner in which the data is stored in the database, would I have any other alternatives other than using an ORDER BY clause?

4

2 に答える 2