Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 10th, 2006, 09:55 PM
wes via AccessMonster.com
Guest
 
Posts: n/a
Default Which is faster?

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
Default 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
Default 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
Default 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
Default 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
Default 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
Default 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
Default 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
Default 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


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles