General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Rushmore in group by and aggregates?
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only