Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which is faster?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Which is faster?
Miscellaneous
Thread ID:
00903686
Message ID:
00903686
Views:
59
Hi All,

I have a table with an integer field indexed ascending. To retrieve the maximum value of that field, which is the faster approach below:

Approach 1:
USE mydb!table1 IN 0 ORDER field1
GO BOTTOM
m.lnMax = table1.field1
USE IN table1 
Approach 2:
USE mydb!table1 IN 0 ORDER field1
CALCULATE MAX(table1.field1) TO m.lnMax
USE IN table1 
If one is faster the other, then why?

Any response will be appreciated greatly!

Dawa
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Next
Reply
Map
View

Click here to load this message in the networking platform