Connecting Tech Pros Worldwide Help | Site Map

Which is faster?

  #1  
Old March 10th, 2006, 09:55 PM
wes via AccessMonster.com
Guest
 
Posts: n/a
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
  #2  
Old March 10th, 2006, 11:45 PM
(PeteCresswell)
Guest
 
Posts: n/a

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
  #3  
Old March 11th, 2006, 01:55 AM
Larry Linson
Guest
 
Posts: n/a

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]


  #4  
Old March 11th, 2006, 11:05 PM
David W. Fenton
Guest
 
Posts: n/a

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/
  #5  
Old March 12th, 2006, 03:35 AM
Larry Linson
Guest
 
Posts: n/a

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


  #6  
Old March 12th, 2006, 06:05 AM
samwise2u via AccessMonster.com
Guest
 
Posts: n/a

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
  #7  
Old March 12th, 2006, 07:45 AM
Randy Harris
Guest
 
Posts: n/a

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.
  #8  
Old March 12th, 2006, 03:55 PM
(PeteCresswell)
Guest
 
Posts: n/a

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
  #9  
Old March 14th, 2006, 07:05 AM
Larry Linson
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which is faster? lak answers 36 August 2nd, 2008 05:45 PM
Which is faster? While vs For, if vs if...else Sonnich answers 4 October 19th, 2006 07:15 AM
use pointer and not use pointer, which is faster to access data? shuisheng answers 4 September 26th, 2006 08:55 AM
which is faster ? junky_fellow@yahoo.co.in answers 18 November 14th, 2005 11:38 PM
Which is faster? Justin Robbs answers 25 November 14th, 2005 06:09 AM