 |
 |
Archives of the TeradataForum
Message Posted: Wed, 05 Jan 2005 @ 11:42:15 GMT
| Subj: | | Re: Effect of ORDER BY in performance |
| |
| From: | | Victor Sokovin |
| | When I looked into the EXPLAIN of the query with and without ORDER BY, the estimated time is shown same with high confidence (as the stats
are rightly available). I was expecting the query with ORDER BY to give a longer time that the one without ORDER BY. | |
| | Any reason, why it wasn't that way..? | |
I think it depends on the number of rows returned. If the sort occurs at the end of the query execution (you should probably see it in the
plan) on a relatively small number of rows in the spool file (if there is any intermediate spool file involved at all) then the sort time is
negligible.
Regards,
Victor
| |