Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do You All Handle Group By Command
Message
From
01/08/2006 18:19:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
01/08/2006 18:15:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01141909
Message ID:
01142247
Views:
19
>>What's the usability of calculating the max() of a character field in a lookup table, which is the same for all records in a group? This would do the same, just much faster.
>
>I have now seen your thoughts.
>
>If you known that on the group the expression is constant, then
>min=max=any and these are equals:
>
>SELECT item,MIN(exp)  FROM test GROUP BY item
>SELECT item,MAX(exp)  FROM test GROUP BY item
>SELECT item,exp       FROM test GROUP BY item,exp
>SELECT item,exp       FROM test GROUP BY exp,item
>
>set engine 70
>SELECT item,exp FROM test GROUP BY item
>
>
>This is a very special case,
>and a lot of times it conceals a bad planning of the database;
>then it is difficult to justify the implementation of ANY()
>
>Besides, the most powerful databaseses (MSSQL,..) succeed in optimizing
>the standard description (with the subquery)
>and they implement of fact a function FIRST().

So if it works that way behind the scenes, there's no overhead? Good to know.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform