Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore in group by and aggregates?
Message
From
13/02/2003 16:09:25
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
13/02/2003 15:18:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00752868
Message ID:
00752894
Views:
10
Hi David,
Aggregate functions (like SUM) don't use Rushmore. If you have no WHERE clause you will read the whole table. (At least that's my current thinking.)

>I know how VFP uses rushmore in a where clause (reasonably well), but I don't know what it does in more complex sql statements.
>
>What indexes would be relevant for the following query?
>
>
>SELECT order_num, item_code, sum(quantity) as tot_qty ;
>from kit_orditems ;
>group by order_num, item_code ;
>having count(*) > 1 ;
>into CURSOR dups
>
>There are already indexes on order_num and item_code. Do the group by fields (or expressions) need to have indexes?
>
>How about the having clause?
>
>
>TIA
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform