As I am creating several reports, it dawned on me the report has it's own expected sort order. Should the underlying query have no Orderby clauses or should it have the Orderby match the sort levels of the report ? Does it matter performance-wise ?
RAZMaddaz
May 16 2012, 07:51 AM
The Order By in the Query does not affect or determine the Order By in the Report and vice versa.
syswizard
May 16 2012, 08:06 AM
Thus if no aggregate verbs are needed in the query as the RecordSource, Orderby clauses should be removed.
RAZMaddaz
May 16 2012, 08:13 AM
QUOTE (syswizard @ May 16 2012, 09:06 AM)
Thus if no aggregate verbs are needed in the query as the RecordSource, Orderby clauses should be removed.
No, it doesn't have to be removed, it is just not going to determine how the Report is ordered.
syswizard
May 16 2012, 08:49 AM
Why waste resources performing a sort that is not useful ?
RAZMaddaz
May 16 2012, 08:55 AM
QUOTE (syswizard @ May 16 2012, 09:49 AM)
Why waste resources performing a sort that is not useful ?
True, but to each their own. As well maybe someone wants to see how the data will look/sort in a Query, before seeing it in a Report. But for now, the more important thing is if you understand?
RAZMaddaz
syswizard
May 17 2012, 09:26 AM
Years and years ago, on the mainframe, we had sorts that ran for HOURS. I've been paranoid ever since about excessive or unwarranted sorting !
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.