Connecting Tech Pros Worldwide Help | Site Map

Which is faster?

wes via AccessMonster.com
Guest
 
Posts: n/a
#1: Mar 10 '06
Is it faster to ...

format the data in the query - then run the report

or

run the query - then format the data in the report

Wes

--
Message posted via http://www.accessmonster.com
(PeteCresswell)
Guest
 
Posts: n/a
#2: Mar 10 '06

re: Which is faster?


Per wes via AccessMonster.com:[color=blue]
>Is it faster to ...
>
>format the data in the query - then run the report
>
>or
>
>run the query - then format the data in the report[/color]


Dunno, but what I read long ago (can't remember the reasoning...) was that
formatting is best done as close to the end result as possible.
--
PeteCresswell
Larry Linson
Guest
 
Posts: n/a
#3: Mar 11 '06

re: Which is faster?


It makes no "sense" to talk about formatting the data other than at the
point of display. The result of applying a Format statement to a _numeric_
variable is the text string of characters that you see. It would be
inefficient, at least in most cases, to store/retrieve the text strings
representing numbers.

Larry Linson
Microsoft Access MVP

"wes via AccessMonster.com" <u17141@uwe> wrote in message
news:5d105f5b29b10@uwe...[color=blue]
> Is it faster to ...
>
> format the data in the query - then run the report
>
> or
>
> run the query - then format the data in the report
>
> Wes
>
> --
> Message posted via http://www.accessmonster.com[/color]


David W. Fenton
Guest
 
Posts: n/a
#4: Mar 11 '06

re: Which is faster?


"Larry Linson" <bouncer@localhost.not> wrote in
news:X_pQf.7588$wH5.2247@trnddc02:
[color=blue]
> It makes no "sense" to talk about formatting the data other than
> at the point of display. The result of applying a Format statement
> to a _numeric_ variable is the text string of characters that you
> see. It would be inefficient, at least in most cases, to
> store/retrieve the text strings representing numbers.[/color]

Well, except for cases where you need to operate on the formatted
values instead of the original. Of course, that would also be slow,
if, for instance, you're sorting on a value passed through the
Format() function. But sometimes it is necessary (though sorting is
not a good example of something that has to be done in the query).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Larry Linson
Guest
 
Posts: n/a
#5: Mar 12 '06

re: Which is faster?



"David W. Fenton" wrote
[color=blue][color=green]
>> It makes no "sense" to talk about formatting
>> the data other than at the point of display. The
>> result of applying a Format statement to a
>> _numeric_ variable is the text string of
>> characters that you see. It would be inefficient,
>> at least in most cases, to store/retrieve the text
>> strings representing numbers.[/color][/color]
[color=blue]
> Well, except for cases where you need to operate
> on the formatted values instead of the original.
> Of course, that would also be slow, if, for instance,
> you're sorting on a value passed through the
> Format() function. But sometimes it is necessary
> (though sorting is not a good example of some-
> thing that has to be done in the query).[/color]

For the life of me, I just can't remember a single occasion where I "needed
to operate on the formatted values instead of the original". I can think of
some occasions where it would definitely not be beneficial... sorting on a
formatted number (which, of course, results in a text string) gives you an
alphabetic sort rather than a numeric one, sorting on Weekday name could
lead to some interesting sequences, etc..

Larry Linson
Microsoft Access MVP


samwise2u via AccessMonster.com
Guest
 
Posts: n/a
#6: Mar 12 '06

re: Which is faster?


So I guess the short answer would be to format data in the report?

--
Message posted via http://www.accessmonster.com
Randy Harris
Guest
 
Posts: n/a
#7: Mar 12 '06

re: Which is faster?


samwise2u via AccessMonster.com wrote:[color=blue]
> So I guess the short answer would be to format data in the report?
>[/color]

I'm not sure there is an answer that is always best. Personally, I do
computations in the query whenever possible but always do the formatting
in the report.

--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
(PeteCresswell)
Guest
 
Posts: n/a
#8: Mar 12 '06

re: Which is faster?


Per samwise2u via AccessMonster.com:[color=blue]
>So I guess the short answer would be to format data in the report?[/color]

I twist that slightly and say:

"Format data in the report unless you have a specific need to do it earlier".
--
PeteCresswell
Larry Linson
Guest
 
Posts: n/a
#9: Mar 14 '06

re: Which is faster?


"(PeteCresswell)" <x@y.Invalid> wrote
[color=blue]
> I twist that slightly and say:
>
> "Format data in the report unless you have
> a specific need to do it earlier".[/color]

I might go even a bit farther and say "Format the data in the report unless
you have a _compelling_ need to do it earlier."

Larry Linson
Microsoft Access MVP


Closed Thread