473,395 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Mar 10 '06 #1
8 1233
Per wes via AccessMonster.com:
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

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
Mar 10 '06 #2
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...
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

Mar 11 '06 #3
"Larry Linson" <bo*****@localhost.not> wrote in
news:X_pQf.7588$wH5.2247@trnddc02:
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.


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/
Mar 11 '06 #4

"David W. Fenton" wrote
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.
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).


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
Mar 12 '06 #5
So I guess the short answer would be to format data in the report?

--
Message posted via http://www.accessmonster.com
Mar 12 '06 #6
samwise2u via AccessMonster.com wrote:
So I guess the short answer would be to format data in the report?


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.
Mar 12 '06 #7
Per samwise2u via AccessMonster.com:
So I guess the short answer would be to format data in the report?


I twist that slightly and say:

"Format data in the report unless you have a specific need to do it earlier".
--
PeteCresswell
Mar 12 '06 #8
"(PeteCresswell)" <x@y.Invalid> wrote
I twist that slightly and say:

"Format data in the report unless you have
a specific need to do it earlier".


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
Mar 14 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
5
by: MLH | last post by:
I have a table I can open as table type recordset or a dynaset. Searching for a particular value in the table's main keyfield, which would be faster and less strain on the application......
18
by: junky_fellow | last post by:
which of the following is faster and why ? if ( x == 1 ) { } or if ( x != 0 ) {
65
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
14
by: Bob | last post by:
I have a function that takes in a list of IDs (hundreds) as input parameter and needs to pass the data to another step as a comma delimited string. The source can easily create this list of IDs in...
7
by: Sunil Varma | last post by:
Is accessing function by it's name faster or accessing it by its address faster?
4
by: Sonnich | last post by:
Hi I have a costum function for a special search, which sort strings. This is currently the place where I can save a lot of time (~70%) if possible. So, which is faster: for($j =...
25
by: Ganesh | last post by:
Hi, This is a question that pertains to pointers in general (C or C++). Which of the following is faster and why? for (int i = 0; i < N; i++) = ... a... (or)
8
by: Sing | last post by:
Dear C Gurus, I would like to optimise a max() algo that my program uses many times. Which one is faster or are they the same? 1. #define max(a,b) (((a) (b)) ? (a) : (b)) 2. if (a>b) return a...
36
by: lak | last post by:
Which is faster? Post Increment or assignment? Why? I was not able to get any things.
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.